Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

histograms with GnuplotIF ?

by hda (Chaplain)
on May 28, 2009 at 18:42 UTC ( [id://766722]=perlquestion: print w/replies, xml ) Need Help??

hda has asked for the wisdom of the Perl Monks concerning the following question:

Wise fellow monks!

I wonder if you had experience plotting histograms with gnuplot via Graphics::GnuplotIF.

Until now I am trying with something like this:
use Graphics::GnuplotIF; my $plot = Graphics::GnuplotIF->new ( style => 'histogram', # one of the gnuplot line styles +(see below) title => "$mytitle", # string xlabel => '$myxlabel', # string ylabel => '$myylabel', # string xrange => [@myxrange], # array reference; autoscaling, +if empty yrange => [@myyrange], # array reference; autoscaling, +if empty plot_titles => [ "$titles" ], # array of strings; titles use +d in the legend persist => 0, # let plot windows survive after gnuplot +exits # 0 : close / 1 : survive ); $plot_glacier->gnuplot_plot_xy ( \@x, \@y ); $plot_glacier->gnuplot_pause();

But it does not work (message = "Graphics::GnuplotIF (object 4): problem closing communication to gnuplot").
Histograms are supported in gnuplot since version 4.2, so perhaps it is only that they are not supported in GnuplotIF. I know it can be done with other modules, but right now I am just interested in using GnuploIF to avoid module-code-clutter. Your words will be appreciated!

Thanks in advance,

Replies are listed 'Best First'.
Re: histograms with GnuplotIF ?
by Utilitarian (Vicar) on May 29, 2009 at 08:56 UTC
    I tend to write a gnuplot file directly, haven't come across GnuPlotIF before, looks interesting though

    However histograms are achieved with plot ...  using histeps not histogram ;)

      Thanks for the reply. GnuplotIF and those in the Chart family are good interfaces, but I agree with you that it is better to use Perl to write the configuration text file and then call gnuplot via system.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://766722]
Approved by almut
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-06-13 05:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.