[pstricks] Help needed twice with pst-bar

Ulrich Bongartz u.bongartz at freenet.de
Wed Mar 3 23:27:26 CET 2010


Hi,

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
\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}}
\begin{psgraph}[labels=y,dy=5,Dy=5,Oy=0,yticksize=0
9](0,0)(9,50){10cm}{6cm}
\psframe[fillcolor=black!10,fillstyle=solid](0,220)(9,300)
\psaxes[labels=none,ticks=y,axesstyle=frame,Dy=10,yticksize=0
9](0,0)(9,50)
 \readpsbardata[header=true]{\data}{dev.csv}
  \psbarchart[barstyle=blue]{\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?

thx in advance

Ulrich 



More information about the PSTricks mailing list