2014-07-01 41 views
0

我正在使用gnuplot进行条形堆叠。我试图在图表上创建一个理想的大小。图中左侧和顶部的任何中断。我认为这不是问题,因为我的乳胶文件可以显示完美的图形没有任何中断。但是当我尝试在其他操作系统上运行时,它在乳胶中有错误。它无法处理图形。我发现这样做的根本原因之后,就发生,因为我使用:左侧和底侧的图形折断

字体”,40"

因此胶乳不能对其进行处理,并在此图中突破。我想它与我的* .eps文件中的中断有关。

这是我的数据:

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 

这是我的输出:

enter image description here

我猜是因为乳胶错误Gnuplot字体,它将清除* .eps文件中的输出是否显示完美的g拉斐。你能帮我吗,我的边界gnuplot脚本有什么问题?感谢或任何建议我的问题?

* ps:图表在Ubuntu 12.04上看起来很不错,但在Mac OS中出现问题。感谢感谢感谢

我设置后lmargin = 10:

enter image description here

+0

@ indi61我想,如果你用'lmargin'沿玩和''tmargin'关键间距“,那么你应该能够把图表放在适当的位置! –

+0

@ZahaibAkhtar谢谢你的回答。 我已尝试保证金选项。如果我们使用lmargin它会滑向左侧,lmargin不能为负值。我也试图用rmargin思考。最大值如上图所示。 我可以调整画布大小吗?我期望* .eps文件显示没有中断的图形。 – indi60

+1

试试这个值:'set lmargin 10' –

回答

2

我增加了以下内容:

set lmargin 10 
set tmargin 15 

这将只需添加一个左边距和上边距到您的情节,使你有足够的空间。

而且改变了这一行:

set key reverse above Left width 3 height 1 font ",40" autotitle columnheader 

我改变高度,以一个小的正数在上述

+0

真棒。谢谢 – indi60

相关问题