在gnuplot中旋转和对齐tic [英] rotating and justifying tics in gnuplot
本文介绍了在gnuplot中旋转和对齐tic的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将xtics旋转45度.换句话说,方向是/
.问题是抽搐会出现在图表区域内,我想将它们放置在图表之外.见图:
I want to rotate the xtics by 45 degree. In another word the direction is /
. Problem is the tics will appear inside the chart area, I want to put them outside of chart. See the figure:
推荐答案
必须同时调整对齐方式(可以是right
,center
或left
)和offset
(相对于x,y
坐标)到xtics
的默认tic位置.
You must adjust both the alignment (can be right
, center
or left
) and the offset
(x,y
coordinates with respect to the default tics position) of the xtics
.
这里是一个示例,它演示了三种不同的可能性. offset
必须手动调整才能正确使用:
Here is an example, which demonstrates the three different possiblities. The offset
must be adjusted manually, in order to get it right:
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):
This gives (with 4.6.4):
这篇关于在gnuplot中旋转和对齐tic的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文