2
$\begingroup$
Plot[{4 - 2 y, (5 + y)/3}, {y, 1, 10}]

graph

How do I make Mathematica tell me the coordinates for cuts with the y-axis, other than just looking at it?

$\endgroup$
  • $\begingroup$ Have a look at the documentation for Solve. $\endgroup$ – Sjoerd C. de Vries Aug 24 '14 at 19:32
4
$\begingroup$

You can also use the MeshFunctions option to get the intercepts as follows:

Plot[{4 - 2 y, (5 + y)/3}, {y, -10, 10},
      MeshFunctions -> {#2 &}, Mesh -> {{0.}},  MeshStyle -> PointSize[Large]]

enter image description here

Plot[{4 - 2 y, (5 + y)/3}, {y, -10, 10},
      MeshFunctions -> {#1 &}, Mesh -> {{0.}},  MeshStyle -> PointSize[Large]]

enter image description here

$\endgroup$
  • $\begingroup$ I'm a little bit disappointed that you got the acceptance :) $\endgroup$ – eldo Aug 25 '14 at 21:53
  • $\begingroup$ @eldo, i know the feeling :) $\endgroup$ – kglr Aug 25 '14 at 22:02
2
$\begingroup$
fun = {4 - 2 y, (5 + y) / 3};

p = Flatten @ Map[Solve[# == 0, y] &, fun] /. Rule[_, a_] :> a

{2, -5}

Plot[fun, {y, -10, 10},
 Epilog -> {PointSize@0.02, Point[{#, 0}] & /@ p},
 FrameTicks -> {p, Automatic},
 FrameTicksStyle -> 12,
 GridLines -> {p, {0}},
 ImageSize -> 500,
 PlotTheme -> "Detailed"]

enter image description here

$\endgroup$

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.