Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Filling question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124449] Re: Filling question
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Fri, 20 Jan 2012 01:49:17 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201201191138.GAA05895@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

I don't see any direct way to do it merely by specifying the Filling 
option. But the following will accomplish what you want.

Plot[{
       Exp[-(x - 3)^2], Exp[-(x - 5)^2],
       Piecewise[{{Exp[-(x - 5)^2], x <= 4}, {Exp[-(x - 3)^2], x >= 4}}]
      },
      {x, 0, 10}, Filling -> {3 -> Axis},
      FillingStyle -> Opacity[0.25, Lighter@Blue],
      PlotRange -> All]

On 1/19/12 6:38 AM, Gabriel Landi wrote:
> Here is a silly question: How to fill the region between two overlapping
> curves? e.g., the region near x=4 in
>
> Plot[{Exp[-(x - 3)^2], Exp[-(x - 5)^2]}, {x, 0, 10}
>
> Thanks in advance,
>
> Gabriel Landi
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305



  • Prev by Date: Interpretation of typesetting using placeholder
  • Next by Date: Re: MatrixForm odd behaviour
  • Previous by thread: Filling question
  • Next by thread: Re: Filling question