[pstricks] bardiag - plotting negative bars
Henning Haida
losmintos at midnightallstars.de
Sat Jun 11 18:46:32 CEST 2005
Dear all,
I would like to plot negative bars in a bardiagram using bardiag. Is that
possible? Please see (the not so minimal) example below.
A second questions is: In bardiag.pdf there is written
\bardiagrambegin{diagheight}{diagwidth}...
Could it be that height and width are mixed up?
Best Regards,
Henning
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Example with negative bar %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{scrreprt}
\usepackage{bardiag}
\usepackage{pstricks}
\begin{document}
\begin{figure}[ht]\centering
%
\definecolor{gA}{gray}{0.9}
%
\newpsstyle{fillone}{fillstyle=vlines*}
\newpsstyle{filltwo}{fillstyle=hlines*}
\newpsstyle{fillthree}{fillstyle=crosshatch*}
%
\bardiagrambegin{8}{165}{1cm}{0.6}{2}{1cm}{0.05cm}
%
\barspergroup{3}
\renewcommand{\barlabelangle}{0}
\renewcommand{\placenumber}{\overtop}
%
\baritem[style=fillone]{40}{0}{gA}
\subbaritem[style=filltwo]{}{10}{gA}
\subbaritem[style=fillthree]{}{4}{gA}
%
\baritem[style=fillone]{50}{48}{gA}
\subbaritem[style=filltwo]{}{-50}{gA}
\subbaritem[style=fillthree]{}{76}{gA}
%
\barspergroup{2}
\baritem[style=fillone]{60}{54}{gA}
\subbaritem[style=filltwo]{}{70}{gA}
%
\barspergroup{3}
\baritem[style=fillone]{70}{57}{gA}
\subbaritem[style=filltwo]{}{153}{gA}
\subbaritem[style=fillthree]{}{137}{gA}
%
\bardiagramend{}{Change in \%}
\end{figure}
\end{document}
More information about the PSTricks
mailing list