#! /usr/bin/gnuplot
reset
set terminal epslatex color size 7in,2in
set output "s.pdf"
set multiplot layout 1,5
set lmargin 0
set bmargin 0
set tmargin 0
set rmargin 0
set size square
set pm3d map
unset colorbox
unset key
set format x "";
set format y "";
set xlabel "";
set ylabel "";
splot x*x+y*y
splot x*x+y*y
splot x*x+y*y
splot x*x+y*y
splot x*x+y*y
unset multiplot
is there a way to do it without adjusting a position of each plot? it
works for normal plots like here http://gibuu.physik.uni-giessen.de/GiBUU/wiki/HowToGnuplotStacked
but not for pm3d
in case there is someone from superuser, i asked this question there
but got no response http://superuser.com/questions/218808/how-to-stack-pm3d-multiplot-in-gnuplot
I guess your problem is very similar to that I have addressed in one of
the recent multiplot/bounding box threads.
> set multiplot layout 1,5
>
> set lmargin 0
> set bmargin 0
> set tmargin 0
> set rmargin 0
>
> set size square
Instead of this you should use the explicit margins
set lmargin screen <x position of left margin in screen coords>
...
You might try the script I have posted there. It is also available and
being updated at
http://www.astro.uni-bonn.de/~ithies/gnuplot/mplayout/
The script calculates the absolute margins by given subframe aspect
ratio (i.e. 1.0 in case of squares), number of columns and rows, and the
requested additional space around the plot array for the labels (the
latter is not yet done automatically; you have to estimate the required
space in canvas units; e.g. lmgadd=0.2 for additional 20 per cent margin
to the left of the array).
You must first call the mplayout_base.gp script for the global settings
(after having specified the parameters mentioned above), and before each
plot mplayout_frame.gp (after having set the current [c]olumn and [r]ow
number, counted from the left and from the top, 1...ncols, 1...nrows).
Try the sample script testframes.gp to see how it works.
HTH
Ingo
I should have mentioned that the script requires gnuplot 4.2.6 (the
ealiest version I have tested) or later. In testframes.gp there has been
the "noclip" option set. This is not needed and is also not supported by
4.2. I have replaced it now (it may take a while until the RAID updates
globally), but if you have downloaded the script before ealier and are
usung 4.2 you might get an error message.
And you will not neet the layout option for multiplot since this is
overrun by the absolute margin positions anyway.
Ingo