plot - 如何在 Mathematica 中向矢量图添加水平线(平衡)
问题描述
y'=3-2y 的平衡解在 y=3/2 处,我想将 y=3/2 线添加到使用 VectorPlot 函数绘制的方向场。怎么做?
下面的附加代码可以做到这一点。
points = {{0, 0}, {1, 0}, {2, 0}, {0, 1}, {1, 1}, {2, 1}, {0, 2}, {1,
2}, {2, 2}};
datplot =
VectorPlot[{1, 3 - 2 y}, {x, 0, 2}, {y, 0, 2},
VectorPoints -> points, VectorScale -> {Automatic, Automatic, None},
Epilog -> {Red, PointSize[Medium], Point[points]}];
fitplot = Plot[y = 3/2, {y, 0, 2}];
{Show[datplot, fitplot]}
玛丽·A·马里恩
解决方案
改变
Epilog -> {Red, PointSize[Medium], Point[points]}
至
Epilog -> {Red, PointSize[Medium], Point[points], Line[{{0,3/2},{2,3/2}}]}
推荐阅读
- r - 使用用户生成的函数对数据框的 2 列进行排序,使 1 列的值小于相应列
- google-apps-script - 将 OLDVALUE 复制到新的 CELL
- reactjs - express 如何为 React App 提供 index.html 以及如何修改它?
- python - 如何在忽略空行的情况下计算一列中的单词数
- javascript - 上传文件前带有预览 PDF 的 Vue + Element UI
- c# - 了解列表中的枚举器
- python - 如何在 Python 中打印上标
- spring-boot - 使用 OAS3 生成 swagger 文档
- prolog - prolog 谓词以连续表示法添加 2 个数字并在 Z 中也以连续表示法获得结果
- javascript - 如何修复由 MediaSource 显示的错误 Uncaught DOMException?