MathGroup Archive 2000

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

Search the Archive

Re: Amazing backgrounds


In a message dated 9/12/2000 9:37:13 PM, moonbloody at lycos.com writes:

>Using Background option in Plot we can obtain monocromatic background only.
>Is there a way to draw a plot over a shaded background ? It' s to say over
>a background, as an example, spamming from red on the left to yellow on
>the rigth.
>

n = 30; xmin = 0; xmax = 2Pi; ymin = -1; ymax = 1;

Show[Graphics[
      Table[Flatten[
          {Hue[.1(k - 1)/n], 
            Rectangle[{xmin + (k - 1)(xmax - xmin)/n, 
                ymin}, {xmin + k(xmax - xmin)/n, ymax}]}, 1], 
        {k, 1, n}]], 
    Plot[Sin[x], {x, xmin, xmax}, PlotStyle -> AbsoluteThickness[2], 
      DisplayFunction -> Identity], 
    Axes -> False, Frame -> True, ImageSize -> {500, 310}];

Show[Graphics[
      Table[Flatten[
          {Hue[.1(k - 1)/n], 
            Rectangle[{xmin, ymin + (k - 1)(ymax - ymin)/n}, {xmax, 
                ymin + k(ymax - ymin)/n}]}, 1], 
        {k, 1, n}]], 
    Plot[Sin[x], {x, xmin, xmax}, PlotStyle -> AbsoluteThickness[2], 
      DisplayFunction -> Identity], 
    Axes -> False, Frame -> True, ImageSize -> {500, 310}];


Bob Hanlon


  • Prev by Date: Re: Re: mathlink
  • Next by Date: Re: Mapping down two lists
  • Previous by thread: Re:Amazing backgrounds
  • Next by thread: RE: Amazing backgrounds