xtic标签在图表底部消失(沿x轴)

时间:2014-07-16 13:03:20

标签: gnuplot

我正在尝试使用“gnuplot”绘制直方图。我使用的代码就是打击:

#!/usr/bin/gnuplot

###PNG
set terminal pngcairo size 650,550 enhanced dash font "arial,10" #fontscale 1.20
set output "hb-maltoLyo12per.png"

set macro
labelFONT="font 'Arial,23'"
scaleFONT="font 'Arial,18'"
scaleFONT2="font 'Arial,13'"


set boxwidth 0.75 absolute
set style fill solid 1.00 border -1
set style histogram rowstacked
set style data histograms

set xtic  rotate by -30  1000 nomirror  @scaleFONT2 offset character -1, 0, 0
set ytics 100 nomirror  @scaleFONT
set mxtics 2
set mytics 5
set ytics 2
set yrange [0:10]
set ylabel "Hydrogen Bond"  @labelFONT
set xlabel ''                      

plot 'data_average_HB.dat' using 2 t "Inter-moleculear HB", '' using 3:xticlabels(1) t "Lipid to Solvent HB" with histogram

使用上面的代码,我得到了一个显示in histogram

的情节

xtics标签(沿x轴)隐藏在图表下方。每一个都是长短语。我希望它们看起来可见。

我的代码中是否有任何遗漏?我怎么能做到这一点?

非常感谢提前。

1 个答案:

答案 0 :(得分:1)

Gnuplot不太擅长估算特殊标签格式的边距(例如长旋转标签)。您可以使用set bmargin手动设置下边距。

尝试使用

set bmargin 4

将使用对应于所选字体的4个字符高度的下边距。您可以根据需要调整4

相关问题