swagat.siddhartha has asked for the wisdom of the Perl Monks concerning the following question:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Stacked Bar
by ambrus (Abbot) on Jun 13, 2011 at 10:59 UTC | |
Plot a spiral with gnuplot shows how to make a chart in general. What you called "stacked bar charts" is probably the histogram rowstacked plots of Gnuplot, so let's use those.
Update: see some of these examples of histogram plots of gnuplot webpage. Update: here's an example output to dumb terminal with the following extra options: The data is random so your output may differ.
Update: just to clarify, gnuplot (and the above code example) can produce plots to multiple graphic devices, not only plain ascii drawings like the above example output. The code above does not set the output device so gnuplot will choose an approperiate one, most likely one that draws graphics in a window if you're running it under X or Windows. It can also draw to several saved graphics formats, such as png (raster image) or pdf (vector image) if you tell it so. | [reply] [d/l] [select] |
Re: Stacked Bar
by ww (Archbishop) on Jun 13, 2011 at 10:29 UTC | |
Perl relevance? Data source? Have you read On asking for help? | [reply] |
| |
Re: Stacked Bar
by Corion (Patriarch) on Jun 13, 2011 at 11:53 UTC | |
I wrote me App::ffeedflotr (not yet on CPAN, as I'm not happy with the name) to create ad-hoc graphic output from data. It reuses the flot Javascript engine to plot the nice graphics]. There are some examples on the wiki. Other times, I used SVG::TT::Graph to create charts. | [reply] |
Re: Stacked Bar
by davido (Cardinal) on Jun 13, 2011 at 15:41 UTC | |
Hi swagat.siddhartha, and welcome to the Monastery. The first question you posted here hasn't gone so well. Here is why: Monks are really good at Perl, and even somewhat good at things peripheral to Perl. But they're not good at guessing what you mean. In the case of your question you have to define what platform your bar chart is to target (web/cgi, web/some-framework, excel spreadsheet, Tk-environment, pure-text, GD, etc. Next, we need to know where you are currently in the project; do you just have raw data and no Perl program at all? What does the data-set look like? Preferably you've already started into a script but just got stuck somewhere. If that's the case, you would want to post a minimal amount of relevant code for us to help you with. You should also let us know if you have a strategy for your program. How have you thought you would like to work it out? And it's helpful to know (though we can sometimes guess this part) about your programming background and your background with Perl. We love to be helpful, but we're not a script writing service. Our primary goal is to help you to learn. But you have to help us to do that. Dave | [reply] |