Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8020

Re: Filling question

From Murray Eisenberg <murray@math.umass.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Filling question
Date 2012-01-20 06:51 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jfb2sk$hma$1@smc.vnet.net> (permalink)
References <201201191138.GAA05895@smc.vnet.net>

Show all headers | View raw


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@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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Filling question Murray Eisenberg <murray@math.umass.edu> - 2012-01-20 06:51 +0000

csiph-web