0
$\begingroup$

I wan to delete some points in this picture

f[x_] := E^x - a x;
g[x_] := a x - Log[x];

Manipulate [
 Plot[{f[x] /. a -> 1, g[x] /. a -> 1, b},
  {x, -2, 4},
  Mesh -> {{0, 0}},
  MeshFunctions -> ({(f[#] /. a -> 1) - b &, (g[#] /. a -> 1) - b &}),
  MeshStyle -> PointSize[Large]],
 {{b, 1.5}, 1, 2}]

enter image description here

$\endgroup$

1 Answer 1

4
$\begingroup$

Try

    Manipulate[
 Show[{Plot[{f[x] /. a -> 1 , b}, {x, -2, 4}, Mesh -> {{0, 0}},
    MeshFunctions -> ({(f[#] /. a -> 1) - b &(*,(g[#]/. a\[Rule]1)-
       b&*)}),
    MeshStyle -> {Darker[Green], PointSize[Large]}, 
    PlotStyle -> {Blue, Green}],
   Plot[{g[x] /. a -> 1  }, {x, -2, 4}, Mesh -> {{0, 0}},
    MeshFunctions -> ({ (g[#] /. a -> 1) - b & }),
    MeshStyle -> {Darker[Green], PointSize[Large]}, 
    PlotStyle -> Red]}], {{b, 1.5}, 1, 2}]

enter image description here

$\endgroup$
4
  • $\begingroup$ It feels like it wasn't handled perfectly $\endgroup$ Jun 20 at 11:17
  • $\begingroup$ I think it's ok. I'll work on it myself $\endgroup$ Jun 20 at 11:30
  • $\begingroup$ Isn't it the answer you are looking for? $\endgroup$ Jun 20 at 11:32
  • $\begingroup$ It's what I want. I wasn't really looking $\endgroup$ Jun 20 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.