gnuplot -e 'set datafile separator ","; plot "data.csv" using 2:4 with lines' -p

Category: Data Science & Analysis

gnuplot -e 'set datafile separator ","; plot "data.csv" using 2:4 with lines' -p

Plot and keep the interactive window open

Without an explicit terminal, gnuplot opens an interactive window, and the -p flag (persist) keeps it open after the script finishes. The window supports zooming and panning with the mouse. Interactive mode is ideal for exploring data before exporting a final image. In -e strings, each set command still needs its semicolon separator.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.