[pstricks] Bar chart
Marco Daniel
marcodaniel1807 at googlemail.com
Tue Jun 23 23:02:44 CEST 2009
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
More information about the PSTricks
mailing list