| www.delorie.com/gnu/docs/octave/octave_12.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To display the solution of the previous example graphically, use the command
plot (t, x) |
If you are using the X Window System, Octave will automatically create a separate window to display the plot. If you are using a terminal that supports some other graphics commands, you will need to tell Octave what kind of terminal you have. Type the command
gset term |
to see a list of the supported terminal types. Octave uses
gnuplot to display graphics, and can display graphics on any
terminal that is supported by gnuplot.
To capture the output of the plot command in a file rather than sending the output directly to your terminal, you can use a set of commands like this
gset term postscript gset output "foo.ps" replot |
This will work for other types of output devices as well. Octave's
gset command is really just piped to the gnuplot
subprocess, so that once you have a plot on the screen that you like,
you should be able to do something like this to create an output file
suitable for your graphics printer.
Or, you can eliminate the intermediate file by using commands like this
gset term postscript gset output "|lpr -Pname_of_your_graphics_printer" replot |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |