[pstricks] framing overlapping objects

Matthias Thomae bluez at thomae-privat.de
Wed Aug 18 10:21:18 CEST 2004


Hello Herbert,

thanks for your quick reply.

Herbert Voss wrote:
> Matthias Thomae wrote:
> 
>> Does anyone know a solution for this, maybe using something different 
>> than a psmatrix, or how to get the psmatrix to calculate its borders 
>> 'correctly' in such a case?
> 
> you can use \rput with the optional argument

Ok, but that's unfortunately not the solution to my problem, because I 
don't know if the legend fits within the plot (without touching the data 
points). That's why I thought of taking psmatrix.

Look at this case:

\documentclass{article}
\usepackage{pst-all}% only pst-all, it loads pstricks.sty anyway

\def\mydata{ 0 0 3 4 5 2.5}

\def\legend{%
   \psframebox{%
     \begin{psmatrix}[rowsep=0.0cm]
       \bf legend \psspan{2} \\
       par 1 & val 1 \\
       par 2 & val 2
     \end{psmatrix}%
   }%
}

\begin{document}

text above

\psframebox{
\begin{pspicture}(-1,-1)(5,5)
    \rput[lt](1,6){\legend}
    \psaxes(0,0)(5,5)
    \listplot[plotstyle=line,showpoints=true]{\mydata}
\end{pspicture}
}

text below

\end{document}


Regards
Matthias




More information about the PSTricks mailing list