Source: ascii_heatmap_demo.f90
Render a heatmap to terminal-friendly ASCII output.
ascii_heatmap_demo.f90 - Source codeoutput/example/fortran/ascii_heatmap/make example ARGS="ascii_heatmap_demo"
ASCII output:
ASCII Heatmap: Circular Ripples
+--------------------------------------------------------------------------------+
| 2.0 |
| |*++++==------::::...............::::::::::::...............::::------==++++** |
| 1.5+==------::::...........::::::::::::::::::::::::...........::::------==++** |
| |+++==----::::............:::::----------------:::::............::::----==++++ |
| |+==------::............:::--------==----==--------:::............::------==++ |
| |+------::::..........::::---==--============--==---::::..........::::------++ |
| |=------::..........::::-----====++++++++++++====-----::::..........::------== |
| |=----::::........::::-----==++****************++==-----::::........::::----== |
| |-----::..........::------=++****####@@@@####****++=------::..........::------ |
| 1.0-::::........::::----==+**######%%@@@@%%######**+==----::::........::::---- |
| 0.5-::........::::----==++*##%%@@@@@@@@@@@@@@@@%%##*++==----::::........::---- |
| |---::........::------++**###@@@@@@##@@@@##@@@@@@###**++------::........::---- |
| 0.0-::........::----==++**#%%@@@@####****####@@@@%%#**++==----::........::---- |
| |---::........::----==++**#@@@@%%##**++++**##%%@@@@#**++==----::........::---- |
| |---::........::----==++###@@@@####++====++####@@@@###++==----::........::---- |
| |---::........::----==++###@@@@####++====++####@@@@###++==----::........::---- |
| |---::........::----==++**#@@@@%%##**++++**##%%@@@@#**++==----::........::---- |
| |---::........::----==++**#%%@@@@####****####@@@@%%#**++==----::........::---- |
| |---::........::------++**###@@@@@@##@@@@##@@@@@@###**++------::........::---- |
| -0.5::::........::----==++*##@@%%@@@@@@@@@@@@%%@@##*++==----::........::::---- |
| -1.0::::........::::----==+**######%%@@@@%%######**+==----::::........::::---- |
| |-----::..........::------=++****####@@@@####****++=------::..........::------ |
| |=----::::........::::-----==++****************++==-----::::........::::----== |
| |=------::..........::::-----====++++++++++++====-----::::..........::------== |
| |+------::::..........::::---==--============--==---::::..........::::------++ |
| |+==------::............:::--------==----==--------:::............::------==++ |
| |+++==----::::............:::::----------------:::::............::::----==++++ |
| -1.5==------::::...........::::::::::::::::::::::::...........::::------==++** |
| +-----------+------------+------------+------------+------------+-----------+- |
| -3 -2 -1 0 1 2 3 |
+--------------------------------------------------------------------------------+
ASCII output:
ASCII Heatmap: Four Gaussian Peaks
+--------------------------------------------------------------------------------+
| 2.0 |
| | ...............::::::-------::::::::::::::::-------::::::.............. |
| |...............::::----=======----------------=======----::::.............. |
| 1.5...........::::--====+++++========----========+++++====--::::............ |
| |...........::::--====++++***++++++========++++++***++++====--::::.......... |
| |...........::----==++****###****++++++++++++****###****++==----::.......... |
| |...........::--==++**##@@@@@##******++++******##@@@@@##**++==--::............ |
| 1.0.......::::--==++**@@@@@@@@@##************##@@@@@@@@@**++==--::::.......... |
| |.........::::--==++**@@@@@@@@@@@##********##@@@@@@@@@@@**++==--::::.......... |
| |.........::::--==++**@@@@@@@@@@@##********##@@@@@@@@@@@**++==--::::.......... |
| 0.5.........::--==++**##@@@@@@@##****++++****##@@@@@@@##**++==--::............ |
| 0.0.........::--==++****##@####****++++++++****####@##****++==--::............ |
| |...........::----==++****#******++++++++++++******#****++==----::............ |
| |...........::::--==++++*******++++++====++++++*******++++==--::::.......... |
| |...........::::--==++++*******++++========++++*******++++==--::::.......... |
| |...........::::--==++++*******++++========++++*******++++==--::::.......... |
| |...........::::--==++++*******++++++====++++++*******++++==--::::.......... |
| |...........::----==++****#******++++++++++++******#****++==----::.......... |
| -0.5........::--==++****##@####****++++++++****####@##****++==--::............ |
| |.........::::--==++**@@@@@@@@@##************##@@@@@@@@@**++==--::::.......... |
| |.........::::--==++**@@@@@@@@@@@##********##@@@@@@@@@@@**++==--::::.......... |
| -1.0......::::--==++**@@@@@@@@@@@##********##@@@@@@@@@@@**++==--::::.......... |
| |.........::::--==++**@@@@@@@@@##************##@@@@@@@@@**++==--::::.......... |
| |...........::--==++**##@@@@@##******++++******##@@@@@##**++==--::............ |
| |...........::----==++****###****++++++++++++****###****++==----::............ |
| |...........::::--====++++***++++++========++++++***++++====--::::.......... |
| -1.5..........::::--====+++++========----========+++++====--::::............ |
| |...............::::----=======----------------=======----::::.............. |
| +-----------+------------+------------+------------+------------+-----------+- |
| -3 -2 -1 0 1 2 3 |
+--------------------------------------------------------------------------------+
ASCII output:
ASCII Heatmap: Saddle Point
+--------------------------------------------------------------------------------+
| 2.0 |
| |#####%%####****++++++=====------------------------=====++++++****####%%###### |
| |#####%%%%####****++++++=======----------------=======++++++****####%%%%###### |
| 1.5#**##%%%%####****++++++==========================++++++****####%%%%##**##++ |
| |=######%%%%%%####****+++++++====================+++++++****####%%%%%%######== |
| |=++######%%%%######****+++++++++============+++++++++****######%%%%######++== |
| |===########%%%%####*******++++++++++++++++++++++++*******####%%%%########==== |
| |-==++##**##%%%%%%####*******++++++++++++++++++++*******####%%%%%%##**##++==-- |
| |-==++########%%%%######*******++++++++++++++++*******######%%%%########++==-- |
| 1.0===########%%%%%%######*********++++++++*********######%%%%%%########====-- |
| 0.5-==++########%%%%%%#####************************#####%%%%%%########++==--:: |
| |:--==++########%%%%%%#####************************#####%%%%%%########++==--:: |
| |:--====########%%%%%%#######********************#######%%%%%%########====--:: |
| |:--====####**##%%%%%%#######********************#######%%%%%%##**####====--:: |
| 0.0-====####**##%%%%%%#######********************#######%%%%%%##**####====--:: |
| |:--====####**##%%%%%%#######********************#######%%%%%%##**####====--:: |
| |:--====####**##%%%%%%#######********************#######%%%%%%##**####====--:: |
| |:--====########%%%%%%#######********************#######%%%%%%########====--:: |
| -0.5==++########%%%%%%#####************************#####%%%%%%########++==--:: |
| |:--==++######%%%%%%######**************************######%%%%%%######++==--:: |
| -1.0==########%%%%%%######*********++++++++*********######%%%%%%########====-- |
| |-==++########%%%%######*******++++++++++++++++*******######%%%%########++==-- |
| |-==++##**##%%%%%%####*******++++++++++++++++++++*******####%%%%%%##**##++==-- |
| |===########%%%%####*******++++++++++++++++++++++++*******####%%%%########==== |
| |=++######%%%%######****+++++++++============+++++++++****######%%%%######++== |
| -1.5####%%%%%%####****+++++++====================+++++++****####%%%%%%######== |
| |+##**##%%%%####****++++++==========================++++++****####%%%%##**##++ |
| |#####%%%%####****++++++=======----------------=======++++++****####%%%%###### |
| +-----------+------------+------------+------------+------------+-----------+- |
| -3 -2 -1 0 1 2 3 |
+--------------------------------------------------------------------------------+