Skip to content Accesskey=4Skip to sub-navigation Accesskey=3View our Accessibility Options MIT Information Systems Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help

On This Page

[Help]

  

Quick Links

Top Level

Related Links

Ask OLC a question

Athena Consulting Homepage

Helpdesk Stock Answers (for Mac/PC questions)


How to print from Gnuplot

Here's how to plot gnuplot graphs:

1. Plot the graph in the gnuplot window. Make sure it is what you wish to
   print.

2. Type:

	set output "filename"

   The filename will be the name of the file you give to your plot.  
   Make sure that gnuplot was started from a writable directory,
   such as your own. A full path may also be used in place of a
   filename (e.g., /mit/user/gnuplots/filename).

3. Type:

	set terminal postscript

   Everything plotted after this point will be written in PostScript
   format to the output file specified in '2'.

4. Type:

	replot

   This will replot the plot created in step '1' which will now
   be written into the output file. 'plot' may also be used but
   the output will be directed to file filename.

   To make a plot into another file without first seeing it in a
   window, just:

	set output 'anotherfile'

   and use plot, or replot.

5. Type:

	set terminal xwindow

   This will reset the terminal device so that subsequent plots
   appear in the gnuplot window.


6. Send the file you saved to the printer:

	lpr -Pprintername filename



MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.