Plot Data With gnuplot

Render functions and data files as charts, including terminal output.

macOSstatsimageconvertLow risk
Run gnuplot -p -e "plot sin(x)" to draw a sine curve and keep the window open.

01Command

Command
$ gnuplot -p -e "plot sin(x)"

02What it does

gnuplot reads commands or expressions and renders publication-quality plots. It can output to many formats such as PNG or SVG, and the dumb terminal even draws simple plots as ASCII, which is useful over SSH.

03Risk

RiskLow risk
CompatibilitymacOS with Homebrew installed
!Warning: On headless machines interactive window terminals fail; explicitly select an image or dumb terminal instead.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Homebrew formula: gnuplot
    Homebrew · vendor-doc · 2026-09-20
    Evidence: Command-driven, interactive function plotting. Packages gnuplot, a portable plotting utility with terminal and image outputs.

Last verified: 2026-09-22 · Category: Developer