开发者

Histograms in Chart::gnuplot ( perl ) Is it possible?

I know gnuplot can handle histograms. I know per开发者_开发百科l is effectively doing a pass through when using Chart::gnuplot. And when I set plot type to histograms I don't get an error. But it does keep complaining that there are too many columns. Which is a bit baffling since I am only setting data for the y axis.

Has anyone ever plotted a histogram using Chart::gnuplot straight up? Example code?


There is no functionality to create histograms in the perl module Chart::gnuplot. You can regex a plot template and generate from a system / exec call.


This URL does not help?

http://chartgnuplot.sourceforge.net/

here are examples - maybe for your problem too.


To plot histogram by Chart::Gnuplot, the "using" option of the dataSet object need to be set as:

using => "2:xticlabels(1)"

Besides, please don't forgot to set the style as "histograms". E.g.

my $ds = Chart::Gnuplot::DataSet->new(
    xdata => [qw(A B C)],
    ydata => [1, 2, 3],
    using => "2:xticlabels(1)",
    style => "histograms",
);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜