Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Plotting a Hash Key-value pair

by martin (Friar)
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.

Replies are listed 'Best First'.
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...

      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.


        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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://862355]
[1nickt]: Nice. So happy that Dells are still user-repairable. Unusual these days.
[1nickt]: I will certainly not be buying any more Macs.
[Corion]: 1nickt: Yeah, or at least, I hopoe so ;)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2017-03-27 13:15 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.