我正在尝试使用gnuplot绘制堆叠条形图。例如,我尝试使用下面的数据和gnuplot代码绘制堆叠条形图:
数据为:
year foo bar rest
1900 20 10 20
2000 20 30 10
2100 20 10 10
gnuplot代码是:
#
# Stacked histograms
#
set term png size 300,300
set output 'stackedhisto.png'
#set title "Stacked histogram\nTotals"
# Where to put the legend
# and
我试图从这个网站的脚本绘制条形图,但我在我的屏幕上得到以下错误。有什么想法吗?
perl bargraph.pl -gnuplot -fig -png scenario1.perf
sh: fig2dev: not found
convert: no decode delegate for this image format `/tmp/magick-XXpiZBkY' @ error/constitute.c/ReadImage/532.
convert: missing an image filename `-' @ error/convert.c/ConvertImag
我正在尝试绘制一个冲动图,这是我当前的脚本:
set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350
set output 'test.png'
set key bmargin left horizontal Right noreverse enhanced autotitles box linetype -1 linewidth 1.000
plot 'example.csv' using 2:xtic(1) title co
下面的plot命令生成一个条形图,在每个条形图的上方,值被绘制为标签,格式为gprintf:
plot "data.txt" using 6:1 index 0 notitle with boxes linestyle 1,\
"data.txt" using 6:(0.7):(gprintf("%5.2f", $1)) index 0 notitle \
with labels font "Courier,34" rotate left
我希
我有一个gnuplot脚本,它生成如下条形图:
输入数据位于有许多列的文件中,每个列最终贡献给图表中的一个集群(示例中显示了2个集群)。每个文件贡献到图表中的一个条形图(示例中有9个)。每个文件可能有大量行。
该脚本接受输入数据文件,并使用stats命令生成包含原始文件每列一行的新文件。每一行都包含其源列的平均值、最小值和最大值。
然后使用这些新文件绘制带有错误条的条形图。每个文件代表一个条,每一行都为一个集群贡献力量。情节代码如下:
plot for [f in FILES] f.'.stats' using 2:3:4 title columnhead(1), \