【发布时间】:2014-04-29 16:42:08
【问题描述】:
我对 gnuplot 直方图有疑问。 我有文件数据并想手动创建 xtics。 这是我的数据:
5 10 15 20 25 30 35
这是我的 gnuplot:
set terminal pngcairo enhanced font "arial,10" fontscale 1.0 size 500, 350
set output 'histograms.2.png'
set boxwidth 0.9 absolute
set style fill solid 1.00 border lt -1
set key inside right top vertical Right noreverse noenhanced autotitles nobox
set style histogram clustered gap 1 title offset character 0, 0, 0
set datafile missing '-'
set style data histograms
set xtics border in scale 0,0 nomirror rotate by -45 offset character 0, 0, 0 autojustify
set xtics norangelimit font ",8"
set title "testing"
plot 'histogram2.dat' using($0):xtic("sdaf") title "Legend 1", \
'' using($2):xtic("sdasa") title "Legend 2", \
'' using($3):xtic("sdSs") title "Legend 3", \
'' using($4) title "Legend 4", \
'' using($5) title "Legend 5", \
'' using($6) title "Legend 6", \
'' using($7) title "Legend 7"
在我当前的图表中,第一行不能出现在图表中。 我还想在 x 轴上制作标签,并且所有条形都具有相同的颜色。
这是我当前的输出:
【问题讨论】: