欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

python畫圖模塊plotnine怎么安裝

本篇內(nèi)容主要講解“python畫圖模塊plotnine怎么安裝”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“python畫圖模塊plotnine怎么安裝”吧!

創(chuàng)新互聯(lián)是專業(yè)的東明網(wǎng)站建設(shè)公司,東明接單;提供網(wǎng)站設(shè)計、成都網(wǎng)站設(shè)計,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進行東明網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!

安裝

按照官網(wǎng)教程直接使用pip安裝

pip install plotnine

遇到報錯python畫圖模塊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命令后加參數(shù)--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 from
https://github.com/matplotlib/matplotlib/blob/v3.3.1/matplotlibrc.template
or from the matplotlib source distribution
 

搜索了一番,發(fā)現(xiàn)有人說可以卸載已經(jīng)安裝的matplotlib然后再重新安裝試試 使用pip命令卸載

pip uninstall matplotlib
 

重新安裝命令

python -m pip install -U matplotlib --prefer-binary -i https://pypi.tuna.tsinghua.edu.cn/simple
 

matplotlib升級到了3.3.1 沒有遇到報錯 打開python然后再導入plotnine模塊

from plotnine import *
 

這次沒有任何提示了

接下來試著運行其中的一個例子

from plotnine import *
from plotnine.data import mtcars
ggplot(mtcars,aes(x='wt',y='mpg',color='factor(gear)'))+geom_point()
 
python畫圖模塊plotnine怎么安裝
image.png
ggplot(mtcars,aes(x='wt',y='mpg',color='factor(gear)'))+geom_point()+facet_wrap('~gear',scales="free")
 
python畫圖模塊plotnine怎么安裝
image.png

保存為pdf文件

(ggplot(mtcars,aes(x='wt',y='mpg',color='factor(gear)'))+geom_point()+facet_wrap('~gear',scales="free")).save("Desktop/p1.pdf")

到此,相信大家對“python畫圖模塊plotnine怎么安裝”有了更深的了解,不妨來實際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進入相關(guān)頻道進行查詢,關(guān)注我們,繼續(xù)學習!

分享標題:python畫圖模塊plotnine怎么安裝
文章起源:http://chinadenli.net/article28/pgpjcp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站改版、品牌網(wǎng)站設(shè)計ChatGPT、營銷型網(wǎng)站建設(shè)移動網(wǎng)站建設(shè)、網(wǎng)站營銷

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運營