This question is to some part identical to what has already been asked here. But the referenced question never received the answer to the point whether the issue presented here is a bug or documentation confusion.
Documentation states with respect to the layout option of multiplot:
With the layout option you can generate simple multiplots without having to give the set size and set origin commands before each plot: Those are generated automatically, but can be overridden at any time.
My understanding of that text is that layout sets origin and size and at any time, i can change those specifications. Then this should work:
set xrange [0:10]
set multiplot layout 3,1 margins 0.1,0.95,0.12,0.95 spacing 0,0
unset key
plot cos(x) axes x1y1 w l ls 3 notitle
plot sin(x) axes x1y1 w l ls 3 notitle
set key bottom center out horizontal
plot sin(x) axes x1y1 w l ls 3 notitle
set origin 0.3,0.5
set size 0.2,0.1
set xrange [1:2]
plot cos(x) axes x1y1 w l ls 3 notitle
unset multiplot
But it does not. gnuplot completely ignores set size and set origin commands. What it should do is to plot 3 plots under each other and then create an inset at screen position (0.3,0.5) of size relative to canvas (0.2,0.1).
My questions are:
- Is this a bug that should be reported or is this poorly formulated documentation issue (that layout can be overridden by
set positionandset size)? multiplotoffers two ways to position the sub-plots,set origin+set sizeandset *marginwhere*stands for one ofb,t,l,r. Can someone provide a deeper explanation when one should use which? (For me it feels the proper way that was meant to do it isset originand margins just became a dirty trick that works but was not meant for that)- What would be the cleanest way to produce the plot that I am looking for that would be easily reproducible (for any other problem, not just 3 plots but any plots and without some tedious calculations of positions)?
- Is there a way to print the settings of
origin,size, margins and any other relevant settings that are automatically calculated (and used) when thelayoutoption is specified?
