colors - 使用 gnuplot 将箱线图中的框背景设置为特定颜色

标签 colors gnuplot

我有以下数据:

# id       min  1st quart     median  3rd quart        max          sum    std-dev name
  1    0.00029    0.02590    0.06331    0.12910    6.50177   1524.58705    0.13483 spec
  2    1.50041    1.59762    1.67226    1.79827   13.45151  26583.69935    0.48373 schema
  3    0.00206    0.01292    0.02505    0.09679  116.93156   5337.36854    2.06006 truss

以及以下 gnuplot 脚本:

set terminal png enhanced background rgb 'white' size 1920,1200 font "Verdana 10"
set output "charts/summary.png"
set boxwidth 0.2 absolute
set title "Validating all data"
set xrange[0:4]
set yrange[0.00005:50]
set logscale y
set grid y

set tics scale 0
set xtics rotate by -45
set xtics nomirror
set ytics nomirror
set border 2

set style fill solid 0.25 border -1
set style data boxplot


plot "data/summary" using 1:3:2:6:5:(0.6):xticlabels(9) with candlesticks title 'Quartiles' whiskerbars, \
         ''         using 1:4:4:4:4:(0.6) with candlesticks lt -1 notitle

其输出如下:

Box plot

问题是我不知道如何设置箱线图中方框的背景颜色。我似乎只能通过删除 set style fill Solid 0.25 border -1 行来打开和关闭填充颜色。

最佳答案

虽然关键字的名称没有暗示这一点,但 linecolor 似乎会影响框的颜色,例如:

plot "data/summary" using 1:3:2:6:5:(0.6):xticlabels(9) with candlesticks lc rgb 'blue' title 'Quartiles' whiskerbars, \
    ''         using 1:4:4:4:4:(0.6) with candlesticks lt -1 notitle

关于colors - 使用 gnuplot 将箱线图中的框背景设置为特定颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44287001/

相关文章:

graph - 使用 gnuplot 绘制点的标记坐标

r - 根据R中列散点图中的值的一种颜色渐变

gnuplot - 如何加粗和调整图表上的标签大小?

fonts - 禁用 gnuplot 的字体抗锯齿

c++ - 将 GNUPLOT 与 Visual Studio 结合使用

gnuplot - 在 gnuplot xaxis 上混合日期和时间

jquery - 从输入 [type=color] 更新显示颜色

Javascript - 生成相同颜色的不同阴影

来自名称的 C# 颜色值

css - 如何更改博客页面上链接的颜色?