MathGroup Archive 2008

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

Search the Archive

Re: Gradient fill as Background for Plot

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

On 15 =C9=C0=CE, 14:17, "David Park" <djmp... at comcast.net> 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