Introduction to gnuplot

Gnuplot is a data-plotting program which is available on CDF. To run it, type gnuplot:

  % gnuplot
        G N U P L O T
        unix version 3.5 
        patchlevel 3.50.1.17, 27 Aug 93
        last modified Fri Aug 27 05:21:33 GMT 1993 
        Copyright(C) 1986 - 1993   Colin Kelley, Thomas Williams
        Send comments and requests for help to info-gnuplot@dartmouth.edu
        Send bugs, suggestions and mods to admin@cdf.toronto.edu
  Terminal type set to 'x11'
  gnuplot> 

You can plot functions:

  gnuplot> plot [x=0:100] 5*x*x*x+10

If you have x,y data in a file, like

  1 10
  5 10.4
  20 15
  100 17
  354 20
  1000 30

then you can plot the data:

  gnuplot> plot "filename"

You can choose to have log/log plots. This command sets both x and y axes to log10:

  gnuplot> set logscale xy 10
  gnuplot> plot [.01:1000] [.01:1000] "filename"

Warning:If you will be measuring things on these graphs, make sure that the horizontal and vertical axes have the same scale. You may have to use the mouse to resize the plot window.

Help is also available:

  gnuplot> ?plot
  gnuplot> ?set


Back to general information