I try
gnuplot> set multiplot
multiplot> set size 0.4,0.4
multiplot> set origin 0.1,0.1
multiplot> plot sin(x)
multiplot> set size 0.4,0.4
multiplot> set origin 0.5,0.5
multiplot> plot cos(x)
multiplot> set terminal postscript color
And gnuplot said:
You can't change the terminal in multiplot mode
In http://science.nas.nasa.gov/~woo/gnuplot/multiplot/multiplt.html,
I saw a multiplot demonstration with a gif picture.
How do to save the plot in a file (postscrit) after have see it on a X11
terminal ?
*-----------------------------------------------------------------------------*
* Regis Gras | Tel (33) 04 76 82 62 60 *
* Laboratoire CEPHAG | ou (33) 04 76 82 64 26 *
* ENSIEG, Rue de la Houille Blanche BP 46 | Fax (33) 04 76 82 63 84 *
* 38402 Saint Martin d'Heres CEDEX, France | e-mail Regis...@cephag.inpg.fr *
*-----------------------------------------------------------------------------*
> I am using gnuplot-beta336, and I use multiplot to draw several curves on the
> same plot.
> Multiplot works very weel with X11, but how to do to save the plot in a
> Postscript file.
>
> I try
> gnuplot> set multiplot
> multiplot> set size 0.4,0.4
> multiplot> set origin 0.1,0.1
> multiplot> plot sin(x)
> multiplot> set size 0.4,0.4
> multiplot> set origin 0.5,0.5
> multiplot> plot cos(x)
> multiplot> set terminal postscript color
>
> And gnuplot said:
> You can't change the terminal in multiplot mode
There is an inconvenience in making a multiplot on your screen and
then changing the terminal in order to get a file copy. That is due
to the fact that gnuplot cannot change the terminal type in the middle
of the multiplot (as the message told you), and you can't use "replot"
either, because that will only repeat the final "plot" command instead
of the entire multiplot.
What you really have to do is to give gnuplot all the commands twice --
once for your monitor and once for your file. I do this by writing the
gnuplot commands into a file and then loading that into gnuplot. Thus
for example I might have a file "gnuplot.input" that contains
set multiplot
set size 0.4,0.4
set origin 0.1,0.1
plot sin(x)
set size 0.4,0.4
set origin 0.5,0.5
plot cos(x)
set nomultiplot
and then from within gnuplot I'd submit the commands
load "gnuplot.input"
and then, if I'm happy with the results,
set terminal postscript color
set output "plot.ps"
load "gnuplot.input"
This also automatically saves a copy of the commands needed to create the
multiplot -- something the code cannot do by itself (the "save" command
only saves the commands for the final plot).
Dick Crawford, aka rccra...@lanl.gov