Gnuplot Multiplot Individual Plot Size + Labels

时间:2017-04-11 12:39:30

标签: gnuplot

我目前正在尝试在Gnuplot中生成一个不错的多时隙。可悲的是我遇到了一些问题。

由于两个数字的y轴相同,我只想标记和定时一次,但是我不能仅从左图中删除它们。

其次我想增加左图的宽度,同时减小右图的宽度。

这是我到目前为止所得到的图片,代码如下。

Plot so far

Patch

提前感谢您的任何答案!

1 个答案:

答案 0 :(得分:1)

如@Christoph所述,使用显式边距是其中一种解决方案。在您的特定情况下,您可以继续:

#dimensions are in screen units
width_left = 0.48
width_right = 0.25
eps_v = 0.12
eps_h_left = 0.1
eps_h_right = 0.05

unset key

set multiplot

set tmargin at screen 1. - eps_v
set bmargin at screen eps_v

set lmargin at screen 0.1
set rmargin at screen eps_h_left + width_left

set xr [0:1.4]
set xtics 0,0.2,1.4
set yr [-40:5]
unset ytics
set y2r [-40:5]
set y2tics in mirror
set format y2 "" #draw ticks but no tic labels

set title "Plot 1"
set xlabel "title 1"
plot 1/0

set lmargin at screen 1. - (width_right + eps_h_right)
set rmargin at screen 1. - eps_h_right

set xr [0:100]
set xtics 0,25,100
unset y2tics
set yr [-40:5]
set ytics in mirror
set mytics 1

set title "Plot 2"
set xlabel "title 2"
set ylabel "Energy [eV]"
plot 1/0

这会产生: enter image description here

如果Energy [eV]标签应该完全向左移动,可以相应地调整间距/抽搐......