This function ``prints'' the currently active plot to a file. The generic syntax for its use is
printplot(filename)
or, alternately,
printplot filename
where filename
is the (string) filename of the destined file. The current
plot is then saved to the output file using a format that is determined
by the extension of the filename. The exact output formats may vary on
different platforms, but generally speaking, the following extensions
should be supported cross-platform:
jpg
, jpeg
- JPEG file
ps
, eps
- Encapsulated Postscript file
png
- Portable Net Graphics file
Here is a simple example of how the figures in this manual are generated.
--> x = linspace(-1,1); --> y = cos(5*pi*x); --> plot(x,y,'r-'); --> printplot printplot1.eps --> printplot printplot1.jpg
which creates two plots printplot1.eps
, which is an Encapsulated
Postscript file, and printplot1.jpg
which is a JPEG file.