Graph 图形在左侧和底部断开
我正在工作的gnuplot与酒吧堆叠。我试图在图形上创建一个理想的大小。图表左侧和顶部的任何中断。我认为这不是问题,因为我的latex文件可以显示完美的图形,而不会出现任何中断。但当我尝试在其他操作系统中运行时,它在latex中出现了错误。它无法处理图形。在我找到这一问题的根本原因后,这是因为我正在使用: 字体“40” 所以,乳胶不能处理它,在这个图上会断裂。我想这与我在*.eps文件中的中断有关 这是我的数据:Graph 图形在左侧和底部断开,graph,latex,gnuplot,Graph,Latex,Gnuplot,我正在工作的gnuplot与酒吧堆叠。我试图在图形上创建一个理想的大小。图表左侧和顶部的任何中断。我认为这不是问题,因为我的latex文件可以显示完美的图形,而不会出现任何中断。但当我尝试在其他操作系统中运行时,它在latex中出现了错误。它无法处理图形。在我找到这一问题的根本原因后,这是因为我正在使用: 字体“40” 所以,乳胶不能处理它,在这个图上会断裂。我想这与我在*.eps文件中的中断有关 这是我的数据: desc is-1 is-2 is-3 is-4 i
desc is-1 is-2 is-3 is-4 is-5 is-6 is-7 is-8
A 37.01 24.80 28.39 2.65 3.70 1.10 2.20 0.14
B 58.16 22.19 9.95 3.06 3.32 3.32 0.00 0.00
C 40.46 18.72 18.49 6.45 14.27 1.04 0.33 0.24
D 30.29 31.59 22.39 9.69 1.30 2.37 1.57 0.80
E 35.41 15.88 24.71 14.67 7.18 1.52 0.32 0.32
F 29.91 30.36 18.29 9.46 8.29 1.26 1.89 0.54
Tot 37.41 22.61 21.76 7.71 7.66 1.52 0.99 0.34
这是我的Gnuplot文件:
set term pos eps font 20
set style data histogram
set style histogram rowstacked
set style fill solid border -1
set key reverse above Left width 3 height -2.5 font ",40" autotitle columnheader
set key outside top spacing 2.5
set boxwidth 0.7
set format y "%.0f%%"
set yrange [0:100]
set size 0.9 , 2
set ytics out nomirror
#set offset -0.3,-0.6,0,0
#label count
set label 1 "854" at 0,102 rotate by 90 font ",40"
set label 2 "274" at 1,102 rotate by 90 font ",40"
set label 3 "1564" at 2,102 rotate by 90 font ",40"
set label 4 "740" at 3,102 rotate by 90 font ",40"
set label 5 "979" at 4,102 rotate by 90 font ",40"
set label 6 "204" at 5,102 rotate by 90 font ",40"
set label 7 "4625" at 6,102 rotate by 90 font ",40"
set xtics font ",40"
set ytics font ",40"
set bmargin 3
set xtics offset 0,-1,0
set notitle
set noylabel
set noxlabel
set border 3 lw 2
set output 'output.eps'
plot 'datafile' \
using($2):xtic(1) lt -1 fs pattern 3, \
'' using($3) lt -1 fs pattern 2, \
'' using($4) lt -1 fs pattern 5, \
'' using($5) lt -1 fs pattern 9, \
'' using($6) lt -1 fs pattern 3, \
'' using($7) lt -1 fs pattern 7, \
'' using($8) lt -1 fs pattern 3, \
'' using($5) lt -1 fs pattern 4
这是我的输出:
我猜latex错误是因为Gnuplot字体,如果*.eps文件中的输出显示了完美的图形,它将被清除。你能帮我一下吗,我的border gnuplot脚本有什么问题吗?谢谢你,对我的问题有什么建议吗
*ps:在Ubuntu12.04上,图形看起来不错,但在mac os上却有了突破。谢谢,谢谢
在我设置lmargin=10后:
我添加了以下内容:
set lmargin 10
set tmargin 15
这些只会在绘图中添加一个左边距和上边距,以便有足够的空间
并更改了这一行:
set key reverse above Left width 3 height 1 font ",40" autotitle columnheader
我在上面的indi61中将高度改为一个小的正数,我想如果你使用
lmargin
和tmargin
以及键间距
,那么你应该能够将图形放置到位@感谢您的回答。我尝试过保证金期权。如果我们使用lmargin,它将向左滑动,并且lmargin不能为负值。我也试着用rmargin来思考。最大值如上图所示。我可以调整画布的大小吗?我希望*.eps文件不间断地显示图形。请尝试此值:set lmargin 10
great@ZahaibAkhtar我使用set key out top spacing 2.5
和height-2.5
,但相同。你确定只有set key
?好的,我将添加一个答案,但实际上,你可以通过使用值来解决这些问题,这里没有魔术。