Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^5: Bucketing,Slicing and Reporting data across multiple dimensions

by pvaldes (Chaplain)
on Aug 17, 2011 at 22:22 UTC ( #920808=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Bucketing,Slicing and Reporting data across multiple dimensions
in thread Bucketing,Slicing and Reporting data across multiple dimensions

maybe the idea of a %colorhash could be refined... I'm thinking that there is not a good way to indicate a range as a key

my $color = "lightgrey"; while (<DATA>) # chomp and split next if (impact = 0); $plot->add_node($idname, label => $idname"); # parent node if ($impact in range(1..10){ $plot->add_edge($idname => $fooname, color => "darkblue"); } elsif ($impact in range(11..30){ $plot->add_edge($idname => $fooname, color => "blue"); } elsif ($impact in range(31..50){ $plot->add_edge($idname => $fooname, color => "cyan"); } # etc ... else { $plot->add_edge($idname => $fooname, color => "red"); } } # we close the while loop # and create the plot...

we can choose a range of custom colors from blue to red, white to black or something like this. And we could also wish to ignore all nodes with an impact of, for example, <40

The final plot will be typically very big, thus to ignore some low impact nodes can be a good idea

For the same reason a vector (svg) file is a good output extension. pdf is also good, you can zoom it a selection a lot, but you will need to convert an eps to a pdf, and can get lost in the process.

Of course, there are caveats: The big files with thousands of nodes are always a little problematic creature for viewing purposes, I really wish to be able to fit all the scaled plot in the firefox or inkscape screen

And you need always a lot of patience when you try to create a plot like this. It takes some time to compile, (in fact can take a LOT of time with big node nets) but we can't be very fussy when we try to push thousands of nodes connected by thousands of lines in a single plot


Comment on Re^5: Bucketing,Slicing and Reporting data across multiple dimensions
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2014-09-15 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (147 votes), past polls