# [pstricks] latex->dvips->ps2pdf->pdflatex

Herbert Voss Herbert.Voss at FU-Berlin.DE
Wed Jun 24 18:37:57 CEST 2009

David Arnold schrieb:
> Herbert et al,
>
> I am afraid I just don't understand what is going on with this psgraph.

David,
as I already wrote, use the postscript environment for all stuff
which isn't inside a pspicture and psmatrix environment:

\documentclass[12pt]{article}

\usepackage{pst-plot}
\usepackage{pst-bar}
\usepackage{pst-tree}
\usepackage{auto-pst-pdf}

\usepackage{filecontents}

\begin{document}

The following bar chart show the average price (in cents) of one gallon
of regular gasoline in the United States over five consecutive weeks in
2009, running from May 18 through June 22.

\begin{filecontents*}{GasolinePrices.csv}
5/18, 5/25, 6/1, 6/15, 6/22
230, 243, 252, 267, 269
\end{filecontents*}

\begin{postscript}
\psset{xAxisLabel={Date (2009)},xAxisLabelPos={c,-0.3in},
yAxisLabel={PPG Regular Gasoline},yAxisLabelPos={-0.5in,c}}
\begin{psgraph}[axesstyle=frame,ticks=y,labels=y,Dy=10,Oy=220,yticksize=0
5](0,0)(5,60){5cm}{4cm}
\psbarscale(1){220 sub}
\psbarchart[barstyle=blue]{\data}
\end{psgraph}
\end{postscript}

What was the price (in cents) of one gallon of regular gasoline on June
1, 2009?

\end{document}

this works for me with pdflatex -shell-escape ...

Herbert