MathGroup Archive 2008

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

Search the Archive

Re: Gradient fill as Background for Plot

  • To: mathgroup at
  • Subject: [mg89651] Re: Gradient fill as Background for Plot
  • From: lehin.p at
  • Date: Mon, 16 Jun 2008 06:41:06 -0400 (EDT)
  • References: <g3033p$maq$> <g32q8b$c4c$>

On 15 =C9=C0=CE, 14:17, "David Park" <djmp... at> wrote:
> You can use a DensityPlot as a background. But you may want to specify the
> specific PlotRange so it will coordinate with the other plot elements. Here
> is how I would do it with the Presentations package. We just draw the
> background first and then put the other plot elements on top of it. Rescale
> is a convenient method to control what values are fed to the color function.

Thank you for the idea! Just now I have found very nice particular
ready-for-use solution in the Documentation Center! It is located on
"Prolog" page under "Applications" field. It is:

bg = Polygon[{ImageScaled[{0, 0}], ImageScaled[{1, 0}],
    ImageScaled[{1, 1}], ImageScaled[{0, 1}]},
   VertexColors -> {LightYellow, LightYellow, LightYellow, White}];
Plot[-1/x, {x, -1, 0}, Prolog -> bg, PlotRangeClipping -> False]

As I understand there should be some way for using DensityPlot as
Prolog but DensityPlot is not a list of graphics primitives and so may
not be directly passed to Prolog. Does anyone know how to convert
DensityPlot for using as Prolog?

  • Prev by Date: Re: a mathlink question
  • Next by Date: Re: Dynamic GUI problem II.
  • Previous by thread: Re: Gradient fill as Background for Plot
  • Next by thread: Re: Gradient fill as Background for Plot