MathGroup Archive 2009

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

Search the Archive

Re: Question about MeshFunctions (Plot function)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105086] Re: [mg105057] Question about MeshFunctions (Plot function)
  • From: Vicent <vginer at gmail.com>
  • Date: Fri, 20 Nov 2009 06:40:15 -0500 (EST)
  • References: <200911191024.FAA14695@smc.vnet.net>

On Thu, Nov 19, 2009 at 11:24, Vicent <vginer at gmail.com> wrote:

> I've tried this
>
>  Plot[  f[x]  ,  {x , 5 , 10}  ,  Frame -> True  ,  PlotRange -> { 2 ,
> 4 }  ,  AspectRatio -> 1/GoldenRatio  ,  PerformanceGoal -> "Quality"
> ,
>  Mesh -> { { 0. } }  ,  MeshFunctions -> { f1[#] & , f2[#] & }  ,
>  MeshStyle -> { Directive[ PointSize[ Large ] , Red ] , Directive[
> PointSize[ Large ] , Blue ] }  ]
>
> and it works OK: it plots the curve for  f[x]  and marks (in my case)
> two points on it: one red and one blue, at the points where functions
> f1[x]  and  f2[x]  take value  0.
>
> I could do the same with other different functions g[x], g1[x] and g2[x].
>
> But, is it possible to draw both curves in the same frame??  I don't
> know which is the proper syntax --I mean, this:
>
>  Plot[  { f[x] , g[x] }  ,  {x , 5 , 10}  ,  Frame -> True ,
> PlotRange -> { 2 , 4 }  ,  AspectRatio -> 1/GoldenRatio  ,
> PerformanceGoal -> "Quality"  ,
>  Mesh -> { { 0. } }  ,  MeshFunctions -> {  { f1[#] & , f2[#] & }, {
> g1[#] & , g2[#] & }  },
>  MeshStyle -> { Directive[ PointSize[ Large ] , Red ] , Directive[
> PointSize[ Large ] , Blue ] }  ]
>
> produces an error message. How can I get the kind of graphic I want?
>



Hello again.

I would like to make my question clearer, if possible.

I was not asking for this:


Plot[ { f[x] , g[x] }  ,  { x , 5 , 10}  ,  Frame -> True,  PlotRange
-> {2, 4}, AspectRatio -> 1/GoldenRatio,
PerformanceGoal -> "Quality",
Mesh -> {{0}},  MeshFunctions -> {f1[#] & , f2[#] &},  MeshStyle ->
{Directive[PointSize[Large], Red],    Directive[PointSize[Large],
Blue]}]


because I need the red and blue points to be defined in each curve  (f
 and  g)  by two different
pairs of functions  f1, f2  and  g1, g2. I mean, in my case, the
x-position (horizontal coordinate) of the red and blue
points could be different in curves  f  and  g.

I've been told to previously compute the x-positions of the blue and
red point for each curve, and then put them in the graphic with
Epilog.

I am going to try it, but if you have different approaches, I would
like to know them.

Thank you in advance.

--
Vicent Giner-Bosch


  • Prev by Date: Re: Re: Re: Undo in Mathematica
  • Next by Date: Re: I broke the sum into pieces
  • Previous by thread: Question about MeshFunctions (Plot function)
  • Next by thread: Re: Re: Question about MeshFunctions (Plot function)