[pstricks] Bar chart

Ulrich Bongartz u.bongartz at freenet.de
Wed Jun 24 00:21:51 CEST 2009


Hi,

when I try to view your example (latex - dvi->ps) ghostview 4.9 refuses to 
show me anything with a lot of error messages like:

Unknown in Prolog section at line nnnn

What have I done wrong?

regards

Ulrich





----- Original Message ----- 
From: "Marco Daniel" <marcodaniel1807 at googlemail.com>
To: <pstricks at tug.org>
Sent: Tuesday, June 23, 2009 11:02 PM
Subject: Re: [pstricks] Bar chart


> Hello,
>
> according to the last post I would suggest the environment psgraph. It is 
> part of the pstricks-add bundle.
>
> %%
> \documentclass{article}
> \usepackage{pst-bar}
> \usepackage{pstricks-add}
> \usepackage{filecontents}
> \begin{filecontents*}{dev.csv}
> 5/18, 5/25, 6/1, 6/15, 6/22
> 230, 243, 252, 267, 269
> \end{filecontents*}
> \begin{document}
> \psset{xAxisLabel=Year,xAxisLabelPos={c,-0.3in},%
>       yAxisLabel={PPG Regular Gasoline},yAxisLabelPos={-0.5in,c}}
> \begin{psgraph}[labels=y,dy=20,Dy=20,Oy=220,yticksize=0 
> 5](0,0)(5,80){5cm}{4cm}
> \psframe[fillcolor=black!10,fillstyle=solid](0,220)(5,300)
> \psaxes[labels=none,ticks=y,axesstyle=frame,Dy=10,yticksize=0 
> 5](0,0)(5,80)
> \readpsbardata[header=true]{\data}{dev.csv}
> \psbarscale(1){220 sub}
> \psbarchart[barstyle=blue]{\data}
> \end{psgraph}
> \end{document}
> %%%%
>
> So it is easier to scale die figure.
>
>
> regards
> Marco
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> 



More information about the PSTricks mailing list