gpt4 book ai didi

linux - 使用 gnuplot 绘制图表

转载 作者:太空宇宙 更新时间:2023-11-04 04:22:41 25 4
gpt4 key购买 nike

htmlResponseBytes 39842 397888
cssResponseBytes 109265 108988
imageResponseBytes 205179 206662
javascriptResponseBytes 468573 476888
otherResponseBytes 4326 4378

我想使用 gnuplot 绘制此数据的条形图。第一列应出现在 x 轴上,第二列和第三列应使用条形图绘制。第二列今天应该有图例,第三列昨天应该有图例。此外,这些值应该出现在每个条形的顶部。

我已经尝试过了

   reset
dx=5.
n=2
total_box_width_relative=0.75
gap_width_relative=0.1
d_width=(gap_width_relative+total_box_width_relative)*dx/2.
reset
set term png truecolor
set output "profit.png"
set xlabel "Year"
set ylabel "Profit(Million Dollars)"
set grid
set boxwidth total_box_width_relative/n relative
set style fill transparent solid 0.5 noborder
plot "profit.dat" u 1:2 w boxes lc rgb"green" notitle,\
"profit.dat" u ($1+d_width):3 w boxes lc rgb"red" notitle

Copied this code from here, works fine for his data file but doesn't work for mine data file pasted at the top

最佳答案

这个怎么样:

set style data histogram 
set style histogram cluster gap 1
set xtics rotate by 90
set style fill solid
plot 'test.dat' using 2:xtic(1) lc rgb "blue", \
'' using 3

关于linux - 使用 gnuplot 绘制图表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11842389/

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