Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modifying the margin alignment in gnuplot in multiplot mode

Tags:

gnuplot

I have created two plots in multiplot mode using epslatex as output terminal. The y axis labeling is different for both the plots.The first plot's y axis ranges from [0:45] and the second plot's y-axis ranges from [-5e-008 to 4e-007]. Due to the different widths of the y-axis labels, the width of the second plot is less than that of the first plot. I have tried the available scaling options but they do not work. Is it possible to edit the plot so that I can have the same width for both the plots irrespective of the y-axis range?

enter image description here

like image 325
chaitanya majjari Avatar asked Jun 21 '16 14:06

chaitanya majjari


1 Answers

The problem you're experiencing can be reproduced by doing something like so:

set multiplot layout 2,1
plot sin(x)
plot 100000*sin(x)

enter image description here

The left margins are clearly not aligned. To fix this, you can try an explicit definition of where the margins lie:

set multiplot layout 2,1
set lmargin at screen 0.15
plot sin(x)
plot 100000*sin(x)

enter image description here

If your images are side by side, you can adjust the margins taking the appropriate offset into account:

set multiplot layout 1,2
set lmargin at screen 0.15
plot sin(x)
set lmargin at screen 0.5+0.15
plot 100000*sin(x)

enter image description here

like image 158
Miguel Avatar answered Oct 04 '22 11:10

Miguel