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.
make example ARGS="fill_between_demo"
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 6 |
+--------------------------------------------------------------------------------+
time
response

ASCII output:
Stateful fill_between with mask
+--------------------------------------------------------------------------------+
| 1.00 |
| | |
| | -- |
| 0.75 ------------ --- sin(x) |
| | ---------------- |
| 0.50 ------------------- |
| | ---------------------- |
| | ------------------------ |
| | ---------- ----------- |
| 0.25 ------- ------- |
| | ----- ----- |
| 0.00---- --- |
| | -- --- - |
| | -- - |
| -0.25 -- -- |
| | -- -- |
| -0.50 -- -- |
| | -- -- |
| | -- -- |
| -0.75 -- --- |
| | --- --- |
| -1.00 ----- ----- |
| +--+----------+----------+----------+-----------+----------+----------+------- |
| 0 1 2 3 4 5 6 |
+--------------------------------------------------------------------------------+
angle (rad)
amplitude