惠州网站制作专业,动态页面制作,苏州头条新闻,杭州市建设官网链接https://plotnine.readthedocs.io/en/stable/index.html知乎介绍的文章https://zhuanlan.zhihu.com/p/47814353简单介绍语法类似于R语言的ggplot2包的python画图模块安装按照官网教程直接使用pip安装pip install plotnine遇到报错ERROR: Cannot uninstall certifi. It …官网链接https://plotnine.readthedocs.io/en/stable/index.html知乎介绍的文章https://zhuanlan.zhihu.com/p/47814353简单介绍语法类似于R语言的ggplot2包的python画图模块安装按照官网教程直接使用pip安装pip install plotnine遇到报错ERROR: Cannot uninstall certifi. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.搜索一番找到说可以在pip命令后加参数--ignore-installed certifi于是使用命令安装pip install -i https://pypi.tuna.tsinghua.edu.cn/simple plotnine --ignore-installed certifi这次安装成功没有报错python中尝试导入这个模块from plotnine import *提示Bad key animation.mencoder_path in file C:\Users\mingy\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle, line 509 (animation.mencoder_path: mencoder)You probably need to get an updated matplotlibrc file fromhttps://github.com/matplotlib/matplotlib/blob/v3.3.1/matplotlibrc.templateor from the matplotlib source distribution搜索了一番发现有人说可以卸载已经安装的matplotlib然后再重新安装试试 使用pip命令卸载pip uninstall matplotlib重新安装命令python -m pip install -U matplotlib --prefer-binary -i https://pypi.tuna.tsinghua.edu.cn/simplematplotlib升级到了3.3.1 没有遇到报错 打开python然后再导入plotnine模块from plotnine import *这次没有任何提示了接下来试着运行其中的一个例子from plotnine import *from plotnine.data import mtcarsggplot(mtcars,aes(xwt,ympg,colorfactor(gear)))geom_point() image.pngggplot(mtcars,aes(xwt,ympg,colorfactor(gear)))geom_point()facet_wrap(~gear,scalesfree) image.png保存为pdf文件(ggplot(mtcars,aes(xwt,ympg,colorfactor(gear)))geom_point()facet_wrap(~gear,scalesfree)).save(Desktop/p1.pdf)欢迎大家关注我的公众号小明的数据分析笔记本 公众号二维码.jpg