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

Herbert Voss Herbert.Voss at FU-Berlin.DE
Wed Jun 24 08:03:01 CEST 2009


David Arnold schrieb:
> Also,
> 
> If I try to compile this one with pdflatex --shell-escape dev.tex, I get
> the same error as below.

use it with the \previewEnvironment command but with the postscript
environemnt.
Beside of this problem, there is no need to write the axes twice.

Herbert

\documentclass[12pt]{article}

\usepackage{auto-pst-pdf}
\usepackage{pst-bar}
\usepackage{pstricks-add}

\usepackage{filecontents}
\input{longdiv}

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


\begin{document}

\begin{postscript}
\readpsbardata[header=true]{\data}{GasolinePrices.csv}
\psset{xAxisLabel={Date (2009)},xAxisLabelPos={c,-0.3in},
     yAxisLabel={PPG Regular Gasoline},yAxisLabelPos={-0.5in,c}}
\begin{psgraph}[ticks=y,labels=y,dy=10,Oy=220,yticksize=0 5,
   axesstyle=frame,Dy=10,yticksize=0 5](0,0)(5,60){5cm}{4cm}
\psframe*[linecolor=black!40,opacity=0.20](0,0)(5,60)
\psbarscale(1){220 sub}
\psbarchart[barstyle=blue]{\data}
\end{psgraph}
\end{postscript}

\end{document}


More information about the PSTricks mailing list