python - 具有可自定义线宽的 Python 中的隐式绘图?

标签 python matplotlib plot

我们如何增加由 Sympy 的 plot_implicit 生成的绘图的线宽?我也找不到为此 in the API 指定的参数,Google 也不会提供任何权宜之计。

我读过,例如,plot_implicit(Eq(x1**2 + x2**2 - 1))._backend.ax 引用了 Matplotlib 的 Axis 对象,所以我尝试更改从 Sympy 调用 plot_implicit 之前 Matplotlib 的默认线宽,但它没有做任何改变:

from matplotlib import rcParams
rcParams['lines.linewidth'] = 10

如果这不可能(很难相信),还有哪些其他选项可以在 Python 中生成隐式函数图,以便调整线宽?

最佳答案

来自plot_implicit documentation :

plot_implicit, by default, uses interval arithmetic to plot functions. If the expression cannot be plotted using interval arithmetic, it defaults to a generating a contour using a mesh grid of fixed number of points.

这意味着生成的图不是线图,线宽可以任意设置。
放大绘图时也可以观察到网格化效果:
enter image description here

关于python - 具有可自定义线宽的 Python 中的隐式绘图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42330515/

相关文章:

python - 如何在plotly3(不是plotly4)中并排绘制表格和散点图

r - 如何制作具有多个几何图形的自定义 ggplot2 geom

python - 如何使用 distutils 安装 Python 扩展模块?

python - 覆盖 Django ModelForm 中的保存方法

python - 将子图添加到前一个函数生成的图中

matplotlib - 在 ipython notebook 中使用 pylab 时内核忙

Python,matplotlib - 基于条件变量的图例 -

Python 链表 O(1) 插入/删除

python - 如何使用 python 平滑这些信号轨迹?

R:向布局网格添加箭头