In Unix, how can I plot a graph?

Many Unix systems have Gnuplot installed. Gnuplot features include:

  • Plotting of two-dimensional functions and data points in many different styles, including points, lines, and error bars
  • Plotting of three-dimensional data points and surfaces in many different styles, including contour plot and mesh
  • Support for complex arithmetic
  • User-defined functions
  • Support for a large number of operating systems, graphics file formats, and devices
  • Extensive online help
  • Labels for title, axes, and data points
  • Command-line editing and history on most platforms

To start Gnuplot, at the Unix prompt, enter:

  gnuplot

To invoke online help, enter help at the Unix prompt.

The following commands display a graph of the sin function using a standard terminal:

  gnuplot> set term dumb
  gnuplot> plot [-6:6] sin (x)
Note:
The above information was gleaned from the comp.graphics.gnuplot newsgroup FAQ, which is posted every two weeks to comp.graphics.gnuplot, comp.answers, and news.answers, and is available via anonymous FTP at the FAQ Archives.

This is document adoc in the Knowledge Base.
Last modified on 2015-06-19 00:00:00.

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.