gpt4 book ai didi

plot - gnuplot 没有正确显示 rowstacked 直方图

转载 作者:行者123 更新时间:2023-12-02 02:11:53 25 4
gpt4 key购买 nike

以下是我的脚本。

set style data histogram
set style histogram rowstack gap 1
set style fill solid border -1
set boxwidth 0.8
set grid ytics linestyle 1
set key autotitle columnheader
set key below horizontal right
set ylabel "Overhead (%)"
set xlabel "Benchmark"

plot newhistogram "bm1" lt 2, 'plot1.txt' u 2:xtic(1), '' u 3, '' u 4, \
newhistogram "bm2" lt 2, 'plot1.txt' u 5:xtic(1) notitle, '' u 6 notitle, '' u 7 notitle, \
newhistogram "bm3" lt 2, 'plot1.txt' u 8:xtic(1) notitle, '' u 9 notitle, '' u 10 notitle, \
newhistogram "bm4" lt 2, 'plot1.txt' u 11:xtic(1) notitle, '' u 12 notitle, '' u 13 notitle

下面是我的数据。

Threads "Overhead 1" "Overhead 2" "Overhead 3"
w1 6 47 58 8 0 0 15 4 45 12 5 5
w2 4 6 6 5 0 2 1 3 2 10 20 30

我得到的图表如下所示。请注意第 4 个基准(bm4w2)右侧栏的问题。为什么酒吧有偏移量?我不明白这一点。

enter image description here

最佳答案

看起来像是错误/回归。我对你的脚本做了最小的改动,让 gnuplot 停止提示标题:

set style data histogram
set style histogram rowstack gap 1
set style fill solid border -1
set boxwidth 0.8
set grid ytics linestyle 1
set key below horizontal right
set ylabel "Overhead (%)"
set xlabel "Benchmark"

plot newhistogram "bm1" lt 2, 'plot1.txt' u 2:xtic(1) title columnhead(2), '' u 3 title columnhead(3), '' u 4 title columnhead(4), \
newhistogram "bm2" lt 2, 'plot1.txt' u 5:xtic(1) notitle, '' u 6 notitle, '' u 7 notitle, \
newhistogram "bm3" lt 2, 'plot1.txt' u 8:xtic(1) notitle, '' u 9 notitle, '' u 10 notitle, \
newhistogram "bm4" lt 2, 'plot1.txt' u 11:xtic(1) notitle, '' u 12 notitle, '' u 13 notitle

这是使用 gnuplot 4.6 补丁级别 0(绘制在 OS-X 10.5 上)的图表(绘制到 postscript 终端):

Plotted with gnuplot 4.6.0

这是相同的脚本,但带有 gnuplot 4.4 补丁级别 2:

Plotted with gnuplot 4.4.2

如果我使用 png 终端绘图,会发生相同的行为

关于plot - gnuplot 没有正确显示 rowstacked 直方图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12368906/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com