Unconnected lines using missing or NaN

Source code Author Update time

using Plots
gaston()

Missing values and non-finite values, including NaN, are not plotted. Instead, lines are separated into segments at these values.

(x, y) = ([1, 2, 2, 1, 1], [1, 2, 1, 2, 1])
plot(plot([rand(5); NaN; rand(5); NaN; rand(5)]), plot([1, missing, 2, 3], marker = true), plot([x; NaN; x .+ 2], [y; NaN; y .+ 1], arrow = 2), plot([1, 2 + 3im, Inf, 4im, 3, -Inf * im, 0, 3 + 3im], marker = true), legend = false)
Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0.2 0.4 0.6 0.8 3 6 9 12 15 y1 gnuplot_plot_2a gnuplot_plot_3a 1.0 1.5 2.0 2.5 3.0 1 2 3 4 y1 gnuplot_plot_2b 1.0 1.5 2.0 2.5 3.0 1 2 3 4 y1 gnuplot_plot_2c 0 1 2 3 4 0 1 2 3 Im(x) Re(x) y1 gnuplot_plot_2d gnuplot_plot_3d

This page was generated using DemoCards.jl and Literate.jl.