[pstricks] 2 questions about bardiag
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Wed Nov 26 20:02:21 CET 2003
Patrick Drechsler wrote:
> Because I set the linecolor to white. And the normal background is
> white also. That is why I included a default background from prosper
> which has a gradient background. So setting the linecolor to a
> certain value doesn't do me any good in this case. The same goes for
> the white legend background.
>
> I hope my problem is a bit clearer now?
ok, but I think
http://www.perce.de/pstricks/Examples/bardiag.phtml
may be another option to you. Here is the solution for
prosper.
HErbert
\documentclass[slideColor,colorBG,pdf,azure,noaccumulate,ps2pdf]{prosper}
\usepackage{bardiag}
%
\def\diagLegenditem#1#2{%
\addtolength{\legendHeight}{\legenditemheight}%
\setlength{\liyycoor}{\liycoor}%
\addtolength{\liycoor}{-\legenditemheight}%
\psframe[fillstyle=none](\lixcoor,\liycoor)(\lixxcoor,\liyycoor)%
\legendPutRect{#2}%
\setlength{\legendiyc}{(\liycoor+\liyycoor)/2}%
\rput[l](\liiix,\legendiyc){#1}%
}
\begin{document}
%
\begin{slide}{Slide1}%
% following line has to be in front of \bardiagrambegin!!:
\newpsstyle{diagframestyle}{linewidth=1pt,%
linestyle=none,fillstyle=none}%
\bardiagrambegin{10}{10}{2cm}{4}{5}{0.6cm}{0.6cm}%
\renewcommand{\shownumbers}{0}%
\setlength{\captionoffset}{8mm}%
\baritem{ }{5}{green}%
\baritem{ }{8}{yellow}%
\diagLegendbegin{0.5}{9.8}{4}%
\diagLegenditem{\white\tiny\textbf{foo}}{green}%
\diagLegenditem{\white\tiny\textbf{bar}}{yellow}%
\diagLegendend%
\bardiagramend{Foo}{Bar}%
\end{slide}%
\end{document}
--
http://www.pstricks.de/
More information about the PSTricks
mailing list