I’ve been trying to use gnuplot instead of Gd::Chart in my massif_grapher script, mostly just so it can generate zoomable postscript or SVG output.
I first tried using the Chart::Gnuplot perl API, but after a very helpful email conversation with its maintainer Ka-Wai Mak, we found that it cannot yet be used to create gnuplot’s “rowstacked” histograms. So now my gnuplot branch of massif_brancher uses gnuplot directly. However, there are still some problems that I can’t solve easily:
Actually, I wish I could do these stacked (or “cumulative” in Gd::Chart terms) graphs for regular line graphs, instead of just as items on a histogram, in case the snapshot times are not at regular intervals.
November 20th, 2009 at 2:00 pm
If there’s any chance that you could use python instead of perl, I’d highly recommend matplotlib.
November 20th, 2009 at 2:13 pm
benni, yeah, I’ve heard that before, and have already bookmarked it for later reading, but I’d rather not bounce around too much between APIs without really checking that I can’t just fix my bugs. I have no love for perl, but it did let me reuse some existing parsing code.
November 20th, 2009 at 4:07 pm
Probably a dumb question, but have you tried:
set xtics #
where # is > 1?
November 23rd, 2009 at 9:55 am
btmore,
set xtics 1000
should specify that there should be tics on the x axis at every multiple of 1000, right?
No, that doesn’t seem to work. I think the xtic(1) in the using statement overrides it.
You can see this easily by checking out that branch from git and trying
./massif_grapher.pl example_massif.out
The result is then in massif_pretty.ps
November 25th, 2009 at 8:36 am
xtic(1) tells to put the string in column 1 at the same x than that value, so yes they will all be there
As a ugly hack, maybe you can have only put a non empty time in the data set for 1 line every (total number of lines/20)
I could not however find how to have empty label, here is something with “-” which improves the situation :
print TABLE $i % int($n_snapshots/20) ? “-” : $times[$i];
November 25th, 2009 at 9:49 am
Oh and it seems I forgot something in my previous comment, giving a stpe to xtics does not help in this case as the values are strings
November 30th, 2009 at 9:21 am
Pascal, thanks for trying anyway.