Entering the Charts

As part of HalleLeipzig.pm I had my duties to co-organize the recent German Perl Workshop but also the opportunity to give some talks. (Recordings are online [EDIT] now at the CCC video platform). My main talk was about plotting data with Perl (english slides).

I covered the data preparation phase and which Perl modules can handle the necessary math (Stats::Basic, Statistics::PCA, Statistics::KernelEstimation, Math::Spline and so on ). I also taught some color and design theory and how to use the proper visualization properties depending on importance and data type (and modules like Color::Library, Convert::Color, colorbrewer). The third part was a review of all the big and small plot libs on CPAN. And there was a lot to roast because especially the pure Perl ones are often half baked with lots of shortcomings, but also most of the big libraries (wrappers) had serious issues (may post for another day). This process led me also to investigate the module Chart, which was kinda feature complete, well documented, had some 90'ies charm, but also some minor technical issues like can't install from CPAN. So I took the adventure and overtook maintainership, wich went surprisingly smoothly.

The first Week or so I cleaned up the issue tracker from already solved issues, maybe applied some patches too and put the code on github. In this repo is much more material than the pure distro, basically all the stuff I got from previous maintainer, so nothing gets lost and also some own experiments to figure how to go forward. Finally and maybe hardes I converted it into a modern distro complying to all the recent METACPAN standards and make it easy releasable via dzil. After this i just made a test release with no new features (and some little doc updates) : version: v2.401.1.

But today I very proudly announce version v2.402, which brings some niceties and some felt improvements all centered around the main theme of color.

All users will see that the default colors are become more toned down, pleasant and better jiving with each other. I also added some named designer colors form the Pantone report (just look them up in Chart::Color::Constant). I also had to correct some color name definitions which were off any standard (typo). Other main new feature is defining color by HSL color space as in { H => 10, S => 20, L => 30} or { hue => 10, saturation => 20, lightness => 30} (only first letter of has keys are significant). This allows to create colors by defining them with optical properties. In same manner { r => 10, g => 20, b => 30} or { Red => 10, Green => 20, Blue => 30} is also possible. I basically wrote 3 libs for complete new color handling to get nice gradients complementary colors and more, which I need in future.

The next stop will be support for true type fonts (if your GD version is new enough) and templates (bundles of settings) for certain plot designs or color pallets. There might be some more pressing issues with the module but at least i have now a corner of the code base which is completely cleaned up and set to a standard I like and I can expand from there.

To all the faithful users of the module: I will not touch the old API but also only provide bug fixes to it and minor enhancements. Most of the new development will be through a more powerful API through the currently unused main module itself. Hope that will be a workable compromise.


Looks cool!

FYI: I notice that in the PDF of the slides, https://lichtkind.de/vortrag/plot5.pdf, slides 51 - 101 are blank for me. (I'm guessing something didn't get exported to PDF correctly.)


Leave a comment

About lichtkind

user-pic Kephra, Articles, Books, Perl, Programming