Source: disconnected_lines.f90
Line plots with gaps created by NaN separators.
make example ARGS="disconnected_lines"
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
+--------------------------------------------------------------------------------+
| 1.00 |
| | |
| | |
| | o |
| 0.75 o - - -- o - |
| | - |
| | - - - |
| 0.50 |
| | - - - |
| | o o |
| | - - |
| 0.25 - - - |
| | |
| | - - - |
| 0.00 |
| | o o - |
| | |
| -0.25 - |
| | |
| | - |
| | |
| -0.50 o # |
| | - |
| | |
| -0.75 - |
| | - |
| | -o- Disconnected segments - |
| -1.00# Single point o |
| +--+-------+--------+--------+--------+--------+--------+--------+-------+---- |
| 0 1 2 3 4 5 6 7 8 |
+--------------------------------------------------------------------------------+
x
y