[pstricks] includegraphics page of pdf, pst-pdf, auto-pst-pdf
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Sat Mar 22 23:35:23 CET 2008
exelnet at exelnet.de schrieb:
> There is another small question that came up:
>
> \def\yStart{0.3}
>
> % Legend
> \newcommand{\legend}[1]{%
> \psline[linecolor=#1,linewidth=2pt]{-}(1730,\yStart)(1735,\yStart)
> \rput[l](1735,\yStart){\footnotesize \quad #1}
> %increment \yStart
> }
>
> \legend{first}
> \legend{second}
>
> Im trying to add a legend to my graph. But since I ll need to adjust the legend in many other
> files i thought of a method to generate it automatically.
>
> But how can i increment \yStart at the end of the \legend command?
please provide _full_ working examples and not only fragments ...
Herbert
\documentclass[a4paper]{scrartcl}
\usepackage{pstricks}
\begin{document}
\newlength\yStart
\pssetlength\yStart{0.3}% in current PSTricks unit
% Legend
\newcommand{\legend}[1]{%
\psline[linecolor=red,linewidth=2pt]{-}(1.730,\yStart)(1.735,\yStart)
\rput[l](1.735,\yStart){\footnotesize \quad #1}%
\psaddtolength\yStart{0.5cm}%
}
\legend{first}
\legend{second}
\end{document}
More information about the PSTricks
mailing list