help requested creating histogram - error

View: New views
3 Messages — Rating Filter:   Alert me  

help requested creating histogram - error

by melysion :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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!

Re: help requested creating histogram - error

by Hans-Bernhard Bröker-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

melysion wrote:
> I am using gnuplot 4.0.

There's no good reason left to stick with such an outdated version.

Upgrade to a current version (4.2 pl 4) before you try anything else.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Gnuplot-info mailing list
Gnuplot-info@...
https://lists.sourceforge.net/lists/listinfo/gnuplot-info

Re: help requested creating histogram - error

by melysion :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your reply

Unfortunately, gnuplot 4.0 is what is installed at work and I don't have any say as to what software is available. So, like it or not, I'm stuck with it.


Hans-Bernhard Bröker-2 wrote:
melysion wrote:
> I am using gnuplot 4.0.

There's no good reason left to stick with such an outdated version.

Upgrade to a current version (4.2 pl 4) before you try anything else.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Gnuplot-info mailing list
Gnuplot-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-info