This example demonstrates the fundamental plotting capabilities of fortplotlib using both the simple functional API and the object-oriented interface.
basic_plots.f90
- Source codesimple_plot.png/pdf/txt
- Simple sine wave outputsmulti_line.png/pdf/txt
- Multi-line plot outputsmake example ARGS="basic_plots"
figure_t
typeASCII output preview:
Simple Sine Wave
+--------------------------------------------------------------------------------+
|1.0 * * |
| * * * * |
|0.5 * * * * |
| * * * * |
|0.0---------*----*----------------------------*----*----------- |
| * * * * |
|-0.5 ** ** |
| |
|-1.0+--------+----------+----------+----------+----------+--------+ |
0 2 4 6 8 10 |
+--------------------------------------------------------------------------------+
x
sin(x)
Full ASCII Output: Download simple_plot.txt | ASCII Format Guide
ASCII output preview:
Sine and Cosine Functions
+--------------------------------------------------------------------------------+
|1.0 * * - sin(x) |
| * * * * - cos(x) |
|0.5 * * o * * o |
| * *o o * *o o |
|0.0---------*----o---o----------------------------o----*----------- |
| * * o o * |
|-0.5 ** o o ** |
| o o |
|-1.0+--------+----------o----------+----------+------o----+--------+ |
0 2 4 6 8 10 |
+--------------------------------------------------------------------------------+
x
y
Full ASCII Output: Download multi_line.txt | ASCII Format Guide