Source: disconnected_lines.f90
Line plots with gaps created by NaN separators.
Insert NaNs into your data arrays to break a line into separate segments.
disconnected_lines.f90 - Source codeoutput/example/fortran/disconnected_lines/make example ARGS="disconnected_lines"

ASCII output:
Disconnected Line Segments Example
+--------------------------------------------------------------------------------+
| |
| | |
| |
| 0.8 o Disconnected segments |
| # Single point |
| | |
| |
| 0.5 |
| | o |
| o - - - - o - |
| 0.2 - - - - |
| - - - |
| | - - o o |
| - - - |
| 0.0 - - |
| o o - |
| - |
| - |
| | o # |
| -0.2 - |
| - - |
| - |
| | o |
| -0.5 |
| |
| | |
| -0.8 |
| |
| | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| 0 1 2 3 4 5 6 7 8 |
+--------------------------------------------------------------------------------+
x
y