标记地块之间的交点
Labeling points of intersection between plots
首先,对于新手问题,我深表歉意。
我刚开始使用 Mathematica,我有 2 个简单的绘图。我想要做的是让 Mathematica 自动找到交叉点,标记它们并显示坐标。
我搜索了这个论坛,有很多类似的问题,但它们对我来说太高级了。
有人可以解释我如何以最简单的方式做到这一点吗?
求解相等。使用 replacement 获取点的值:points = {x, x^2} /. sol
也可以。偏移标签并在 epilog 中设置为文本。
sol = Solve[x^2 == x + 2, x];
points = {x, x + 2} /. sol;
offset = Map[# + {0, 3} &, points];
Plot[{x^2, x + 2}, {x, -6, 6},
Epilog -> {Thread[Text[points, offset]],
Blue, PointSize[0.02], Point[points]}]
首先,对于新手问题,我深表歉意。
我刚开始使用 Mathematica,我有 2 个简单的绘图。我想要做的是让 Mathematica 自动找到交叉点,标记它们并显示坐标。
我搜索了这个论坛,有很多类似的问题,但它们对我来说太高级了。
有人可以解释我如何以最简单的方式做到这一点吗?
求解相等。使用 replacement 获取点的值:points = {x, x^2} /. sol
也可以。偏移标签并在 epilog 中设置为文本。
sol = Solve[x^2 == x + 2, x];
points = {x, x + 2} /. sol;
offset = Map[# + {0, 3} &, points];
Plot[{x^2, x + 2}, {x, -6, 6},
Epilog -> {Thread[Text[points, offset]],
Blue, PointSize[0.02], Point[points]}]