Source: twin_axes_demo.f90
Demonstrates twinx and twiny for multiple axes on one figure.
The demo plots three synthetic time series and assigns each to a different axis:
Run the example via:
Outputs are written to output/example/fortran/twin_axes_demo/ in PNG and ASCII
formats.
twin_axes_demo.f90 - Source codeoutput/example/fortran/twin_axes_demo/make example ARGS="twin_axes_demo"

ASCII output:
Twin axis demo
+--------------------------------------------------------------------------------+
| |
| 22 - |
| * --------- ----- |
| * --- -- -- Primary axis |
| 20 -- - -- Secondary axis |
| * 5 --10 15 20 25 -- Top axis |
| * -- -- -- |
| 18 -- -- -- |
| * -- -- -- |
| * -- -- -- |
| 16- -- -- |
| *- -- -- |
| * -- -- |
| 14 -- -- |
| * -- -- |
| * -- -- |
| 12 -- -- |
| * -- %%%%%%%%%% %% |
| * -- %%%%- %% % |
| 10 -- %%%%%% -- %% %% |
| * %%%-%%%%% -- %% % |
| * % % % % % %% % --- -- % % |
| 8**************************************************************************** |
|0 |
+--------------------------------------------------------------------------------+
Time (hours)
Temperature (relative)