Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Plotting a Hash Key-value pair

by martin (Pilgrim)
on Sep 28, 2010 at 05:13 UTC ( #862355=note: print w/ replies, xml ) Need Help??


in reply to Plotting a Hash Key-value pair

Are you sure you want to get a histogram with >60000 bars? Even with one-pixel wide bars this would fill a very big space. You might be able to do that with Gnuplot. CPAN has an interface to it: Chart::Gnuplot. See also ISBN 0380756668.

If what you really want to get is a histogram with a much smaller number of bars, you'd have to insert some sort of aggregation. You could add the values of 1000 adjacent keys (numerically sorted) into a new bucket each, say, and plot the accumulated values.


Comment on Re: Plotting a Hash Key-value pair
Re^2: Plotting a Hash Key-value pair
by moritz (Cardinal) on Sep 28, 2010 at 09:00 UTC
    Are you sure you want to get a histogram with >60000 bars? Even with one-pixel wide bars this would fill a very big space.

    As far as I understand, the number of actually drawn histogram bars is determined by the histogram_bins option, not by the number of input values.

    That said, I agree that GD::Graph has some severe limitations (like the inability to do subpixel rendering), and should usually only be used for quick-and-dirty solutions, or when no high quality solution is available.

    Apart from gnuplot there's also Chart::Clicker, which I haven't used yet, but I've heard many people speak well of it.

    Perl 6 - links to (nearly) everything that is Perl 6.
Re^2: Plotting a Hash Key-value pair
by krish28 (Acolyte) on Sep 28, 2010 at 22:38 UTC
    Thanks for replying... I actually binned my data into buckets and plotted it, but i end up having to use binning sizes that are much bigger than i'd prefer.. I will check out chart::gnuplot, thanks...
      hey,

      Thanks for replying guys. I tried using Chart::Gnuplot and put it all in as it was supposed to be put, but i got an esoteric error message "/tmp/Mcr2eoH11Z,plot", line 1: undefined variable: noenhanced". Any help for this??

      I also tried using Chart::Clicker, but i lost heart before i could even start, after seeing the huge list of pre-requisites and pre-requisites for those pre-requisites, that i had to install before i used the module.

        krish28:

        If it leaves the temp file around, you could look at it and see where "noenhanced" is, then refer to the gnuplot docs and see if there's anything odd about the immediate surroundings.

        ...roboticus

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://862355]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-08-20 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (109 votes), past polls