Plot '2col.dat' using 1:2 # 1=x, 2=y (this is the default) Plot '2col.dat' with lines title 'my curve' # this is really the line-title in the legend Plot '2col.dat' with linespoints # plot only elements 3 thru 7 Plot '2col.dat' with linespoints # plot the first 5 elements Plot '2col.dat' with points # just points (default) Plot '2col.dat' with linespoints # line and points Plot '2col.dat' with lines # connect points with a line Plot '2col.dat' # assumes col1=x, col2=y shows '+' at data points
You can find more information about the need for this new brew command at this SO link.
Please select a terminal with 'set terminal'. WARNING: Plotting with an 'unknown' terminal. You’ll know that you need that command if you get this error message when you try to run a plot command inside the gnuplot command line: Note that with OS X Yosemite (10.10.x) I had to use this brew command instead: To get started, you can use MacPorts or Homebrew to install Gnuplot on Mac OS X systems: If you haven’t used it before, it’s an amazing tool for creating graphs and charts.
I needed to use Gnuplot a little bit over the last few days, mostly to create 2D line charts, and these are my brief notes on how to get started with Gnuplot.