Frustrations plotting data with Perl

CPANvisualizationplotting Sat 4 January 2014

While creating the CPAN Report I decided to try and create the plots with as many different CPAN distributions as possible. This turned out to be very frustrating, and in the end I only used two packages.

These days, if I wanted to include a plot in a web page I'll typically use a Javascript library. There are plenty to choose from, and most of them work pretty well out of the box. If I want to whip up a simple plot I'll often use Excel: it's very quick for generating simple plots.

But for the CPAN Report it made sense to generate all of the plots using CPAN modules. I'd previously used GD::Graph quite a bit, so I started with that. The output looks a bit old school, but it gets the job done.

I remembered reading a blog post about Chart::Strip, but it's for time-based plots, so on a quick revisit didn't seem appropriate for my needs. Its SEE ALSO entry makes my top 10 list though!

Next I looked at Chart::Clicker, which I'd heard about a few times. The doc even includes images, and it looks better than the output from many of the CPAN modules. I didn't find the documentation very helpful, and was ready to give up on it, but then looked at the examples directory. I took the pie chart example and reworked that. It's a lot of code for a simple pie chart! I did use this for the report, but might have a go at a ::Simple module for this.

I had a look at Google::Chart, but it wouldn't install (on 5.18.1). I installed VS::Chart, but it only supports line charts, and while they look good, it doesn't appear to support what for me are basic options. Either that or the documentation isn't very thorough. Chart::Graph seems to be a wrapper round 3rd party tools, so I didn't bother trying it.

I just wanted to get the job done, so I didn't spend too long fully evaluating some of the modules. I'll have to come back to that. Hopefully I'll have got my head around more of the modules by the time I do the 2014 report!

comments powered by Disqus