Hello,
I would like to align vertically two plots, but the yaxis labels prevent me from doing that. Here is a minimal working example:
set multiplot
#first plot
set size 1,.5
set origin 0,0
set format y ""
unset ytics
set ytics add ("1" 1, "-1" -1) offset 0,0
p cos(x)
#second plot
res
set size 1,0.3
set origin 0,.5
set format y ""
unset ytics
set ytics add ("1000" 1000, "-1000" -1000) offset 0,0
p 1000*sin(x)
unset multiplot
Because the ylabel in the top panel has 4 digits and the one in the bottom panel has 2 digits, the two plots are not aligned vertically. Do you know how to force gnuplot to align them vertically, without manually tuning the plot position?
Thank you for your help.
Best,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I would like to align vertically two plots, but the yaxis labels prevent me from doing that. Here is a minimal working example:
Which generates this plot
Because the ylabel in the top panel has 4 digits and the one in the bottom panel has 2 digits, the two plots are not aligned vertically. Do you know how to force gnuplot to align them vertically, without manually tuning the plot position?
Thank you for your help.
Best,
You can fix the distance from the left plot border to the canvas border by using
for both plots (or omitting the
reset
in between.See also the "aligned plots" demo at http://gnuplot.sourceforge.net/demo_5.0/margins.html
Last edit: Bastian Märkisch 2017-07-19
This works perfectly, thank you!
Best,
James
Last edit: James 2017-07-21