[pstricks] Transformation into bar chart

Alan Ristow ristow at ece.gatech.edu
Tue Aug 31 22:57:24 CEST 2004


On Tue, 31 Aug 2004 22:11:46 +0200, Matthias Steinbrink
<M.Steinbrink at gmx.de> wrote:

>Hello PSTricks-user,
>
>I hope that I dont ask a too silly question.
>
>I need to transform some graphs that I have already made with pstricks into 
>bar charts. Is there an easy way to achieve this?

Funny you should ask.... I am currently working on a package to make bar
charts. I was planning to unleash it on the list within a week or so for
feedback, but you are welcome to have a look at it now. I haven't been
able to write any documentation for it yet, so you would have to be
satisfied with a minimal example or two (and of course, I would be happy
to answer questions). It reads data directly from a .csv file and allows
quite a lot of customization of the appearance of the bars. However, it
currently only does vertical bars -- no horizontal bars (that and the
lack of documentation are why I'm holding back right now).

Alternatively, you can use the bardiag package, available from any CTAN
mirror I think. It is pstricks-based, but also requires the loading of
several other packages. Plus, I'm pretty sure that you would have to
load pstricks with the noxcolor option, unless it has been updated since
I last tried it, so if you rely on xcolor you may not be able to use it.
(Please, somebody correct me if I am wrong about this.)

Finally, you could look at some of Herbert's examples at www.pstricks.de
that he drew with \psframe (IIRC). That approach would require you to
hard-code the bar heights, rather than read them from a file, but it
would certainly work.

I certainly understand if you do not want to rely on new code that is
still under development, but if you are interested in trying my package
let me know. I can work up a minimal example with your data and upload
it to the web tonight or early tomorrow, then email you with the url.
Otherwise, I'll stick with my original plan and release the package
after I've written some documentation.

Regards,

Alan




More information about the PSTricks mailing list