首页 > 解决方案 > 在 CobraPy 中导入 plot_helper 失败

问题描述

我正在尝试为 CobraPy 做本教程,但似乎无法导入 plot_helper

plot_helper 在哪里?是pip下载吗?

标签: pythonpython-importtoolkitcobra

解决方案


我遇到了同样的问题。我是 cobrapy 的新手,但这解决了我的问题。我为散点图使用了以下链接 https://python-graph-gallery.com/130-basic-matplotlib-scatterplot/ 所以在第 8.1 节中,我个人使用的其他更改是:

import plot_helper在 In[1] 中替换为:

import matplotlib.pyplot

而不是 In[4] 我使用:

matplotlib.pyplot.plot("loopless", "nominal", data=df, linestyle='none', marker='o')
matplotlib.pyplot.show()

希望这可以帮助


推荐阅读