v4169sgr has asked for the wisdom of the Perl Monks concerning the following question:
I use Perl 5.10 from ActivePerl on Win7 with Tkx bindings.
I would like to graph time series data in input format "DD-MM-YYYY HH:MM:SS". The original data contained a TZ adjustment which I can convert to GMT following http://www.perlmonks.org/?node_id=1012596. The time series data shall be binned as per user input values of the upper and lower data bounds, and the number of bins, to define the bin width. The value of a bin shall be the number of timestamps falling within the bin: a simple integer value. I can use Math::SimpleHisto::XS to actually bin my data, but am not sure what format the array returned by the all_bin_contents() method is in.
My challenge is in drawing the data as a vertical bar chart. GD::Graph::histogram does this, but I don't think it can handle time series data. Chart::Clicker https://metacpan.org/module/Chart::Clicker is of course very nice, but I think the number of dependencies will kill my project. I do not have access to Gnu Plot, or similar.
At the moment I use a simple Perl script to covert my timestamps, then inport to MS Excel as a CSV and use the Data Analysis add on http://support.microsoft.com/kb/214269. This is fine for occasional use, but I'd like to write something to reduce the number of steps needed to arrive at usable output.
For chart labels, I am happy to plot the y-axis as an integer, and the x-axis as the time part of the date time stamp i.e. HH:MM:SS.
How can this target be achieved in Perl, without pulling in too many dependencies? I don't actually need to plot the graph, if I can write the graph to an output file in some portable format like PNG, GIF or PDF. I can then use methods included in the Tkx bindings to display the results.
Wisdom gratefully accepted!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Bar chart of binned timestamp data
by RichardK (Parson) on May 20, 2013 at 14:04 UTC | |
by v4169sgr (Sexton) on May 21, 2013 at 15:31 UTC | |
|
Re: Bar chart of binned timestamp data
by ambrus (Abbot) on May 21, 2013 at 10:00 UTC |