[pstricks] Help needed twice with pst-bar

Ulrich Bongartz u.bongartz at freenet.de
Fri Mar 5 19:20:21 CET 2010


Hi,

thx - that helped.

I still have a few questions, but I got my "nerve" back to explore further 
on my own ;-)

thx again

Ulrich




----- Original Message ----- 
From: "Herbert Voss" <Herbert.Voss at FU-Berlin.DE>
To: "Graphics with PSTricks" <pstricks at tug.org>
Sent: Thursday, March 04, 2010 9:35 AM
Subject: Re: [pstricks] Help needed twice with pst-bar


> Am 03.03.2010 23:27, schrieb Ulrich Bongartz:
>> I try to get some charts running but my patience is running out
>>
>> 1) Source below works, but
>> a) why arent the years under the bars?
>> b) I'd like to put 2 more graphs in this diagram
>> c) the values of each line should not be bars but a connected line
>
>> \documentclass{article}
>> \usepackage{filecontents}
>> \usepackage{pst-bar}
>> \usepackage{pstricks-add}
>> \begin{filecontents*}{dev.csv}
>> 2001 2002 2003 2004 2005 2006 2007 2008 2009
>> 1 1 4 4 5 3 4 8 12
>
> should be
>
> 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> 1, 1, 4, 4, 5, 3, 4, 8, 12
>
> you can also use the plotstyle bar for your graph
>
> \usepackage{filecontents}
> \usepackage{pst-bar}
> \usepackage{pstricks-add}
> \begin{filecontents*}{dev.csv}
> 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
> 1, 1, 4, 4, 5, 3, 4, 8, 12
> \end{filecontents*}
> \begin{filecontents*}{dev2.csv}
> 2001 1 2002 2 2003 4 2004 4 2005 5 2006 3 2007 4 2008 8 2009 12
> \end{filecontents*}
> % 15 23 16 28 24 15 19 14 37
> % 16 24 20 32 29 18 23 22 49 % sum of both lines
>
> \begin{document}
>
> \psset{xAxisLabel=Jahr,xAxisLabelPos={c,-0.3in},%
>      yAxisLabel={Anzahl},yAxisLabelPos={-0.5in,c},axesstyle=frame}
> \readdata{\data}{dev2.csv}
> \pstScalePoints(1,1){2000.5 sub}{}
> \begin{psgraph}[dy=5,Dy=5,Oy=0,Ox=2000,showorigin=false,labels=y,
> ticks=y,yticksize=0 9](0,0)(9,50){9cm}{6cm}
> \multido{\rA=0.5+1.0,\iB=2001+1}{9}{\uput[-90](\rA,0){\iB}}
> \listplot[plotstyle=bar,fillcolor=blue!30,fillstyle=solid,barwidth=0.5]{\data}
> \listplot[linestyle=dashed]{\data}
> \end{psgraph}
>
> \end{document}
>
>
>> 2) Is there an easy way for a pie chart (30 red, 400 blue) where the
>> small part is taken out of "the cake"? Or do I have to paint wedges?
>
> read the documentation of pstricks-add => texdoc pstricks-add
>
> Herbert
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/
> 



More information about the PSTricks mailing list