gnuplot 中框/抽动之间的间距

问题描述 投票:0回答:1

我正在尝试使用“with box”命令在 gnuplot 中绘制绘图。问题是我可以使盒子更窄,但盒子之间的间距仍然存在。这让剧情看起来很傻。

我查看了边距、抽动的偏移,并试图找出盒子的样式,但无法让它看起来不错。

首先,我想了解造成间距的原因。盒子风格还是抽搐?当然我不会把它命名为ABCD,那样我就会抽动更长的时间

后来,我想旋转它并将其包含在 LaTeX 文件中,但问题也存在于 wxt 终端/gnuplot 的图形输出中。

我用来生成绘图的代码:

datenfile = "daten.txt"
yachsentitel = "Parameter [\\%]"
set ylabel yachsentitel 
unset key
unset grid
unset border
set boxwidth 0.2
set xtics rotate by 90 right 
set ytics rotate by 90 center
set style fill solid
set output "parameter.png"
set term png
plot datenfile using 2:xtic(1) with boxes

我的数据文件是:

"A."            5.1
"B."            1.73
"C."            0.15
"D."            3.2
gnuplot spacing pdflatex
1个回答
1
投票

“带框”绘图样式需要两个信息字段:x(水平放置)和 y(高度)。通常,绘图命令类似于

  plot "data" using 1:2 with boxes

其中 x 位于第 1 列,y 位于第 2 列。

如果您在“using”部分中仅提供一个数据列说明符,那么它将被解释为 y 和 x 值是从从 0 开始的连续行号生成的。这相当于 gnuplot 所谓的“column 0”和相应的完整命令会是

 plot "data" using 0:1 with boxes

为了哪个

 plot "data" using 1 with boxes

是一种简写形式。如果您更喜欢生成其他一组 x 位置,您可以将其显式放入 using 说明符中:

 plot "data' using (column(0) * 0.1) : 2 : xtic(1) with boxes
© www.soinside.com 2019 - 2024. All rights reserved.