Gnuplot旋转键 [英] Gnuplot rotate key
本文介绍了Gnuplot旋转键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用LaTex中的rotate软件包将图表旋转了270°,从而制作了水平直方图. 调整所有标签和抽签是没有问题的,但是我没有找到旋转琴键的方法.
I made a horizontal histogram by turning the diagram by 270° using the rotate package in LaTex. It is no problem to adjust all the labels and tics, but I did not find a way to rotate the key.
这是我的gnuplot代码:
Here is my gnuplot code:
set terminal epslatex size 16cm, 32cm
set output "stackexchange.tex"
set xrange [-1:8]
set key
set boxwidth 0.95
set style data histograms
set style histogram errorbars
set style fill solid 0.8
set style line 1 lt 1 lc rgb "#0080B0" lw 3
set yrange[600:1100]
unset ytics
set y2tics rotate
set y2label rotate "xyz / abc"
set xtics nomirror rotate scale 0
plot 'stackexchange.dat' using 2:3:xticlabels(1) ls 1 title 'A', '' using 4:5 ls 1 fill pattern 6 title 'B'
这就是我在LaTex中实现它的方式:
That is how I implement it in LaTex:
\begin{figure}
\begin{turn}{270}
\resizebox{!}{0.9\textwidth}{\input{stackexchange}}
\end{turn}
\end{figure}
这是我的数据文件:
A 890.1 3.2 789.9 11.7
B 626.97 20.467 862.8 12.3
C 923.9 5.89 963.8 3.7
D 785.233 15.921 627 2.3
E 903.167 7.94 880.9 1.9
F 863.43 25.237 778.2 4.2
G 909.6 5.370 941 13
H 895.633 40.401 813 11.3
推荐答案
我想你可以做这样的事情:
I suppose you can do something like this :
x = 0.5
y = 1000
dx = 0.1
dy = 50
set label 'B' at x,y rotate by 90 offset 0.5,-1
set style rectangle fc ls 3 fs pattern 6 border 3
set object rectangle from x,y to x+dx,y+dy
我让您设置style rectangle
的属性,使其与直方图匹配.
I let you set the properties of the style rectangle
so it matches your histogram.
这篇关于Gnuplot旋转键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文