温馨提示:本文翻译自stackoverflow.com,查看原文请点击:bar chart - data boxes not displayed by gnuplot
bar-chart gnuplot

bar chart - gnuplot未显示数据框

发布于 2020-05-03 20:43:37

我想使用gnuplot制作条形图。

我用这个设定

set style data boxes
set style fill solid  
plot 'foo.dat' using 1:2:(1) linewidth 2

foo.dat的内容是

8 1
10 1
11 4
12 4

gnuplot仅显示与最后两行相对应的条。

为什么呢 除了将“ 9 0”添加到我的数据文件之外,还有其他解决方案吗?

先感谢您

查看更多

提问者
Alan Leblanc
被浏览
65
Christoph 2020-02-15 04:22

您的y-axis可能会自动缩放为[1:4]。使用例如

set yrange [0:*]

然后,轴始终从0开始,但在另一端自动缩放。