[pstricks] framing overlapping objects
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Wed Aug 18 16:23:43 CEST 2004
Matthias Thomae wrote:
> Now, to compact my pictures, I added a 'feature' to my script which
> calculates the free space (in y direction), and puts this distance as a
> negative row separation to the psmatrix, so that the plot and the legend
> 'overlap' and hence consume less space, as in the following schematic:
in this soluztion you only need the maximum of your data and multiply
it by e.g. with 1.125, inthis case it is 4.5. The legend is put in
a box, so we can measure the height.
hope, it helps
Herbert
\documentclass{article}
\usepackage{pst-all}% only pst-all, it loads pstricks.sty anyway
\def\mydata{0 0 3 4 5 2.5}
\newsavebox\LBox
\newlength\PHeight
\sbox\LBox{%
\begin{tabular}[b]{ll}
\multicolumn{2}{c}{\bf legend} \\
par 1 & val 1 \\
par 2 & val 2
\end{tabular}%
}
\PHeight=\ht\LBox
\advance\PHeight by \dp\LBox
\advance\PHeight by 4.5cm% set by your Python script
\begin{document}
text above
\the\PHeight
\psset{unit=1cm}
\fbox{%
\begin{pspicture}(-1,-1)(5,\PHeight)
\rput[lt](1.25,\PHeight){\fbox{\usebox\LBox}}
\psaxes(0,0)(5,5)
\listplot[plotstyle=line,showpoints=true]{\mydata}
\end{pspicture}%
}
text below
\end{document}
--
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes
More information about the PSTricks
mailing list