【发布时间】:2019-07-08 16:16:24
【问题描述】:
我已将一组聚类数据绘制到直方图的同一图中。由于我有几组数据,我使用了实用的“newhistogram”命令。效果很好,但我还没有找到如何添加 yerrorbars 呢?我很高兴有人熟悉如何将误差条添加到“新直方图”命令中。
我已经尝试添加简单命令“w yerrorbars”,包括对数据文件列的相关引用,但随后该图仅包含 yerrorbars(包括中间的平均值),但不再显示条形图。
...
set datafile separator ','
...
set style data histogram
set style histogram errobars linewidth 1
set bars 0.5
plot newhistogram "Multi-crew ops", 'example.dat' index 0 u 3:xtic(2) t 'Departure', 'example.dat' index 0 u 5:xtic(2) t 'Cruise', 'example.dat' index 0 u 7:xtic(2) t 'Arrival', \
newhistogram "Reduced-crew ops", 'example.dat' index 1 u 3:xtic(2) t 'Departure', 'example.dat' index 1 u 5:xtic(2) t 'Cruise' , 'example.dat' index 1 u 7:xtic(2) t 'Arrival', \
newhistogram "Acceptance of crewing-ops", 'example.dat' index 2 u 9:xtic(1) axes x1y2 t 'All phases'
这没有成功: ...
plot newhistogram "Multi-crew ops", 'example.dat' index 0 u 3:4:xtic(2) t 'Departure' w yerrorbars, ...
这也没有成功:
set datafile separator ','
set style data histogram
set bars 0.5
set style histogram errobars linewidth 1
plot newhistogram "Multi-crew ops", 'example.dat' index 0 u 3:4:xtic(2) t 'Departure', 'example.dat' index 0 u 5:6:xtic(2) t 'Cruise', 'example.dat' index 0 u 7:8:xtic(2) t 'Arrival', \
newhistogram "Reduced-crew ops", 'example.dat' index 1 u 3:4:xtic(2) t 'Departure', 'example.dat' index 1 u 5:6:xtic(2) t 'Cruise' , 'example.dat' index 1 u 7:8:xtic(2) t 'Arrival', \
newhistogram "Acceptance of crewing-ops", 'example.dat' index 2 u 9:10:xtic(1) axes x1y2 t 'All phases'
【问题讨论】:
标签: gnuplot bar-chart histogram errorbar