help requested creating histogram - error
Hi there
I don't use gnuplot very often, so don't know anything beyond the basics. I've recently been asked to modify a plot that I created using gnuplot a while back
Heres the script
set terminal postscript enhanced color
set output 'pic.ps'
set autoscale # scale axes automatically
set xlabel "Number of SSGs" font "Helvetica,15"
set xrange [-0.5 : 11.5]
set x2range [-0.5 : 11.5]
set yrange [0.0 : 310 ] noreverse nowriteback
set ylabel "Number of items" tc lt 1 font "Helvetica,15"
set y2range [0.0 : 540000 ] noreverse nowriteback
set y2label "Population in 2" tc lt 2 font "Helvetica,15"
set ytics nomirror font "Helvetica,12"
set y2tics nomirror font "Helvetica,12"
set xtics nomirror font "Helvetica,12"
set tics out
set style data histogram
set style histogram cluster gap 1
set style fill solid border -1
plot "final.csv" using 2:xtic(1) title col fs solid lc rgb "blue", '' using 3 title col fs solid lc rgb "pink" axes x2y2
When I try to run it, I get the following error
set style data histogram
^
"simax_eap_genome.gnuplot", line 15: expecting 'lines', 'points', 'linespoints', 'dots', 'impulses',
'yerrorbars', 'xerrorbars', 'xyerrorbars', 'steps', 'fsteps',
'histeps', 'filledcurves', 'boxes', 'boxerrorbars', 'boxxyerrorbars',
'vectors', 'financebars', 'candlesticks', 'errorlines', 'xerrorlines',
'yerrorlines', 'xyerrorlines', 'pm3d'
I am using gnuplot 4.0. I think that at one time, I was using gnuplot 4.1 (I've changed computers since) which I guess might cause some problems. I've never had this error before so am a bit confused.
Also, I'm not sure how to specify the colours of the bars. Is the code below correct?
plot "final.csv" using 2:xtic(1) title col fs solid lc rgb "blue", '' using 3 title col fs solid lc rgb "pink" axes x2y2
Thanks in advance for your help!