Re: Small question about Filling between two functions in a
- To: mathgroup at smc.vnet.net
- Subject: [mg94341] Re: Small question about Filling between two functions in a
- From: "sjoerd.c.devries at gmail.com" <sjoerd.c.devries at gmail.com>
- Date: Wed, 10 Dec 2008 05:11:14 -0500 (EST)
- References: <ae0a817a0812090125u1b44a514v20082610b3a9d0a5@mail.gmail.com>
Hi Felipe, My brute-force solution would be to use two Plots and combine them with show: Show[ Plot[{k[x],u[x],g[x]},{x,-2,10}], Plot[{k[x],u[x],g[x]},{x,2,8},Filling->{1->{2},3->Axis}] ] I usally do a Copy As Plain Text copy. Cheers -- Sjoerd On Dec 10, 6:11 am, "Felipe Mannshardt" <vexie.infam... at googlemail.com> wrote: > Forgot to add another thing, > > if i add, > > g[x], which is, g(x) = k(x) - u(x) > > g[x_]:=32+12 x-18 x^2+2 x^3 > > And also add it to the graph, > > Plot[{k[x],u[x],g[x]},{x,-2,10},Filling->{1->{2}}] > > Now, tell Mathematica to: > > Fill the area between k(x) and u(x) in the interval 2->8 (x Axis) > AND > Fill the area between g(x) and x-Axis in the same interval 2->8 (x Axis) > > Would this be possible in the same Plot ? (in one graph only) ? > > Thanks ! > > On Tue, Dec 9, 2008 at 10:25 AM, Felipe Mannshardt < > > vexie.infam... at googlemail.com> wrote: > > Hello, > > > i have been trying to get this working, without much success. > > > What i want, is to fill an area between two functions, but only between= the > > interval from x=2 to x=8 > > > I have, > > > u[x_]:=48x > > k[x_]:=2x^3-18x^2+60x+32 > > > Plot[{k[x], u[x]}, {x, -2, 10}, Filling -> {1 -> {2}}] > > > It draws (fills) every area between k(x) and u(x). > > > How can i tell Mathematica to just fill between a determined interval (= x > > Axis : 2->8 ) ? > > > Thanks ! > > > PS: Between, what is the most used way of pasting text from Mathematica= in > > here ? (Plain Text ? LATEX ? ??? ) > > > Thanks !!!