Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-05-23 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found