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

David Arnold dwarnold45 at suddenlink.net
Wed Jun 24 19:18:41 CEST 2009


Herbert,

Wow! I completely missed that \begin{postscript}...\end{postscript}  
environment. I've never seen that one before. In what document is that  
environment discussed?


On Jun 24, 2009, at 9:37 AM, Herbert Voss wrote:

> 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{pstricks-add}
> \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}
> \readpsbardata[header=true]{\data}{GasolinePrices.csv}
> \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
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks



More information about the PSTricks mailing list