MathGroup Archive 2010

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

Search the Archive

Re: texture for filling?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115081] Re: texture for filling?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 30 Dec 2010 04:12:49 -0500 (EST)

f1[x_] = Sin[x];
f2[x_] = Cos[x];

Plot[{f1[x], f2[x],
  Table[x/3 + b, {b, -3, 1, .1}]},
 {x, 0, 2 Pi},
 PlotRange -> {-1.05, 1.05},
 PlotPoints -> 100,
 PlotStyle -> {Automatic, Automatic, Lighter[Gray]},
 RegionFunction -> Function[{x, y},
   (f1[x] >= f2[x] && f2[x] <= y <= f1[x]) ||
    (f2[x] >= f1[x] && 
      f1[x] <= y <= f2[x])]]

Show[
 Plot[
  Table[x/3 + b, {b, -3, 1, .1}],
  {x, 0, 2 Pi},
  PlotRange -> {-1.05, 1.05},
  PlotPoints -> 100,
  PlotStyle -> Lighter[Gray],
  RegionFunction -> Function[{x, y},
    (f1[x] >= f2[x] && f2[x] <= y <= f1[x]) ||
     (f2[x] >= f1[x] &&
        f1[x] <= y <= f2[x])]],
 Plot[{f1[x], f2[x]}, {x, 0, 2 Pi}]]


Bob Hanlon

---- agua <auguaylupo at gmail.com> wrote: 

=============
Greetings to all.
It is possible that instead of using color, apply
some texture to fill an area between two curves.
For example, fill the region with slanted lines or dots instead of
gray:

Plot[{Sin[x], Cos[x]}, {x, 0, 2 Pi}, Filling -> {1 -> {{2},
Lighter[Gray]}}]

Tk.



  • Prev by Date: Re: texture for filling?
  • Next by Date: Re: Best Way to Copy from Mathematica to Powerpoint?
  • Previous by thread: Re: texture for filling?
  • Next by thread: Re: texture for filling?