Source: fill_between_demo.f90
Create filled regions using both the stateful API and figure_t.
The demo highlights part of an oscillatory curve and shades a baseline response.
Generated files are written to output/example/fortran/fill_between_demo/ in
both PNG and ASCII formats.
fill_between_demo.f90 - Source codeoutput/example/fortran/fill_between_demo/make example ARGS="fill_between_demo"

ASCII output:
Object API fill_between baseline
+--------------------------------------------------------------------------------+
| 0.8 |
| - |
| * ------------- |
| 0.6 ---=============--- |
| ---==================-- |
| * --======================-- |
| 0.4 --==========================-- |
| ---=============================-- |
| * --================================--- |
| -====================================-- |
| 0.2 -=======================================-- |
| -=========================================-- |
| *--============================================- |
| 0.0=============================================-- |
| -=================================================--========================== |
| ---======================== |
| * --======================= |
| -0.2 --===================== |
| ---=================== |
| * ---================= |
| -0.4 ---=============== |
| ----=========== |
| * * * * * * * * * * * * * * * * * * * * * -*--*--*---* |
|0 1 2 3 4 5 |
+--------------------------------------------------------------------------------+
time
response

ASCII output:
Stateful fill_between with mask
+--------------------------------------------------------------------------------+
| |
| * - |
| ------------ |
| ---==========--- -- sin(x) |
| * --===============-- |
| 0.5 --===================-- |
| ---=====================-- |
| * --=========================- |
| --======= ========-- |
| * -===== =====-- |
| --=== ===-- |
| 0.0= =-- |
| *= --- -- |
| -- -- |
| -- -- |
| * -- - |
| -- -- |
| -0.5 - -- |
| -- --- |
| -- -- |
| * -- -- |
| --- --- |
| * * * * * * * * * * * * * * * * * * -*--*--*--*- * * * * * |
|0 1 2 3 4 5 6 |
+--------------------------------------------------------------------------------+
angle (rad)
amplitude