[pstricks] psgraph

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Fri Dec 3 21:49:53 CET 2004


David M. Allen wrote:

> I do have a question, however. I often like to white-out the real world
> box before drawing a graph. This is useful when using a dark background
> or a gradient background. This wipes out axes ticks going into the box.
> What is the best way to achieve the following order: fill box background,
> draw axes, graph stuff?

here is a demo. You can put all in a new environment or
use
\begin{pspicture}()()
\psframe[fillcolor=white,fillstyle=solid]()()
\psgraph ...

...


\endpsgraph

Herbert


\listfiles
\documentclass[11pt]{article}

\usepackage{pstricks}
\usepackage{pstricks-add}

\begin{document}

\newsavebox\PSTBox

\begin{pspicture}(15,15)% only demo here
\psframe[fillcolor=black,fillstyle=solid](15,15)
%
\sbox\PSTBox{
   \psset{llx=-1em,lly=-1em,urx=2em,ury=2em}
   \psgraph(-1,-1)(4,3){6cm}{3.2cm}
     \psaxes{->}(0,0)(-1,-1)(4,3)
   \endpsgraph
}

\begin{pspicture}(\wd\PSTBox,\ht\PSTBox)
\psframe[fillcolor=white,fillstyle=solid](\wd\PSTBox,\ht\PSTBox)
\usebox\PSTBox
\end{pspicture}

\end{pspicture}

\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