MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: coloring everything outside a circle

  • To: mathgroup at
  • Subject: [mg31904] Re: coloring everything outside a circle
  • From: Jens-Peer Kuska <kuska at>
  • Date: Tue, 11 Dec 2001 01:33:39 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <9uf7iv$fiv$>
  • Sender: owner-wri-mathgroup at


you can't do this in Mathematica, because Mathematica
generate a PostScript path and close it with "stroke"
command. Since the PostScript interpreter of Mathematica
interpret not the full PostScript header definitions
it will see only the /Mfstroke and /Mistroke commands
in the PostScript and make lines. 

But you can over write the /Mfstroke and /Mistroke definitions
in the Prolog option and a external PostScript interpreter
like ghostscript will work correctly. Here is an example

gg = ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 2Pi},
    Prolog -> {PostScript[
          "/Mfstroke {fill currentdash pop 0 setdash} bind def"],
        PostScript["/Mistroke {} bind def"]}];

Export["test.eps", gg, "EPS"]

Now look to test.eps with ghostscript or print the file and
you have a filled curve.


Mipam wrote:
> Hi,
> Is it possible with Mathematica to draw a circle,
> or parametricplot and paint everything white outside that circle,
> or closed curve (which is given by parametricplot)?
> Or is it possible to paint everything white between two closed
> curves or circles?
> Plz also cc to mipam at for i aint subscribed to this list.
> Bye,
> Mipam.

  • Prev by Date: Re: Solve InterpolatingFunction problem
  • Next by Date: Re: Trouble with Splice for Java (i.e. there is no JForm)
  • Previous by thread: coloring everything outside a circle
  • Next by thread: Re: Re: Path finding in graph theory, Looking for your help