成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久

您的位置:首頁技術(shù)文章
文章詳情頁

python中pyqtgraph知識(shí)點(diǎn)總結(jié)

瀏覽:6日期:2022-06-29 09:19:19

PyQtGraph是純Python的,只是它底層調(diào)用的是PyQt,也就是Qt的Python封裝,底層用C/C++語言開發(fā)的庫,它是在PyQt的基礎(chǔ)上開發(fā)的可視化控件,相較于老牌的繪制庫,PyQtGraph在繪圖速度上特別突出,保證繪圖的美觀性以及強(qiáng)大功能前提下,能夠極高的效率去繪制圖形,下面一起來詳細(xì)了解下使用技巧吧。

pyqtgraph庫安裝:

pip install --user pyqtgraph

更快安裝方式:

pip3.8 install -i https://mirrors.aliyun.com/pypi/simple

導(dǎo)入方式:

import pyqtgraph as pg

自帶實(shí)例模塊:

python -m pyqtgraph.examples

繪制折線圖:

from pyqtgraph.Qt import QtGui, QtCoreimport pyqtgraph as pgfrom pyqtgraph.widgets.RemoteGraphicsView import RemoteGraphicsViewapp = pg.mkQApp()v = RemoteGraphicsView(debug=False)v.show()v.setWindowTitle(’單1的折線圖’)plt = v.pg.PlotItem()v.setCentralItem(plt)y1=[1,4,2,3,6,2,3,4,2,3]plt.plot(y1, pen=’g’)QtGui.QApplication.instance().exec_()

效果展示:

python中pyqtgraph知識(shí)點(diǎn)總結(jié)

到此這篇關(guān)于python中pyqtgraph知識(shí)點(diǎn)總結(jié)的文章就介紹到這了,更多相關(guān)python中pyqtgraph是什么內(nèi)容請(qǐng)搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!

標(biāo)簽: Python 編程
相關(guān)文章: