plot - 无法设置行堆叠直方图条的边框线宽

标签 plot gnuplot histogram bar-chart

我正在使用 gnuplot 绘制直方图。并想设置所有栏边框的宽度。

我使用以下方法设置直方图条形的样式:

设置样式填充实线边框-1

之后我想设置border的线宽,但是set style fill Solid border -1没有linewidth选项。

你知道这个问题有什么解决办法吗?也许还有另一种方法来设置直方图条的边框宽度?

最佳答案

我不会使用set style fill Solid border -1(或者更好,noborder),而是定义可用于自定义的特定线型>盒子,例如

bw=0.1
n=500
bin(x,width) = width*floor(x/width) + bw/2.0
set boxwidth bw
set style line 2 lc rgb 'gray30' lt 1 lw 2
set style fill pattern 5 
plot 'rnd.dat' using (bin($1,bw)):(1./(bw*n)) smooth frequency with boxes ls 2

此处,使用深灰色和线宽 2 绘制框。

enter image description here

关于plot - 无法设置行堆叠直方图条的边框线宽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8345991/

相关文章:

gnuplot - wxMaxima + gnuplot = 带有扭曲的类似 Mathematica 的密度图

Gnuplot 仅在第一个数据行中解释区域小数分隔符

r - R中大矩阵的直方图

plot - gnuplot - 使用线条颜色作为第三个变量不会生成所需的输出

R - 有循环和无循环绘图之间的差异

python - 使matplotlib python中的hexbin填充方轴上的空白区域?

python - 有没有办法在 numpy.hist 中返回相同长度的数组?

python - matplotlib 用于绘图的大量颜色

pipe - gnuplot : plot pipe output

histogram - 比较画面中同一图表中的两个直方图