MathGroup Archive 2011

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

Search the Archive

Re: FillingStyle -> Striped ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115311] Re: FillingStyle -> Striped ?
  • From: Lou <lvveen32 at xs4all.nl>
  • Date: Fri, 7 Jan 2011 04:10:05 -0500 (EST)
  • References: <ig0brm$saj$1@smc.vnet.net> <ig3pk1$jgi$1@smc.vnet.net>

On 6 jan, 08:05, Armand Tamzarian <mike.honeychu... at gmail.com> wrote:
> On Jan 5, 10:52 am, andrius ruslan <andrius.rus... at googlemail.com>
> wrote:
>
> > For a black/white print of a function I needed some FillingStyle like
> > striped or dotted.
>
> > seems to be a simple task, but haven't found any hint yet.
> > tnx
>
> I seem to remember someone posting something like this to the
> group ... maybe in 2009??? A search of group posts may (?) turn
> something up.
>
> Mike

Hi,
I searched and Bob Hanlon came with an example. By using this and
including the dashed function you'll get dashed lines.

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[Green], Dashing[0.03]}},
  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}]]

Kind regards,
Lou


  • Prev by Date: Solving very large systems of ODEs with NDSolve
  • Next by Date: Re: check if a square matrix is diagonal
  • Previous by thread: Re: FillingStyle -> Striped ?
  • Next by thread: Aborting execution on first message