2013-10-17 29 views

回答

12

您必须调整两种定向(可rightcenterleft)和offsetx,y相对于默认抽动位置坐标)xtics的。

下面是一个例子,它演示了三种不同的可能性。该offset必须手动调整,以获得正确的事:

set xrange [0.5:3.5] 
set bmargin 5 
set multiplot layout 1,3 

set xtics ('first' 1, 'second' 2, 'third' 3) rotate by 45 right 
set title 'right aligned' 
plot x 

set xtics center offset 0,-1 
set title 'centered' 
replot 

set xtics left offset 0,-2 
set title 'left aligned' 
replot 
unset multiplot 

这给(与4.6.4):

enter image description here

+0

为 “右对齐” 你没有提到的偏移。为什么? – mahmood

+1

@mahmood因为对于右对齐,默认位置是正确的。在所有情况下,您都有相同的默认位置,其中放置了标签。但是如果例如标签左对齐,标签将进入绘图区域(只需尝试没有任何“偏移”的脚本) – Christoph