From 8b9c8ecf725718306c3e5b3b5e6b9821fb12235b Mon Sep 17 00:00:00 2001 From: Irony <892768447@qq.com> Date: Thu, 13 May 2021 22:43:14 +0800 Subject: [PATCH] =?UTF-8?q?CPU=E5=8A=A8=E6=80=81=E6=8A=98=E7=BA=BF?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QtChart/CpuLineChart.py | 81 ++++++++++++++++++++++++++++ QtChart/README.md | 10 +++- QtChart/ScreenShot/CpuLineChart.png | Bin 0 -> 26408 bytes README.md | 1 + 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 QtChart/CpuLineChart.py create mode 100644 QtChart/ScreenShot/CpuLineChart.png diff --git a/QtChart/CpuLineChart.py b/QtChart/CpuLineChart.py new file mode 100644 index 0000000..731b805 --- /dev/null +++ b/QtChart/CpuLineChart.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Created on 2021/5/13 +@author: Irony +@site: https://github.com/PyQt5 +@email: 892768447@qq.com +@file: CpuLineChart +@description: +""" + +import sys + +from PyQt5.QtChart import QChartView, QChart, QSplineSeries, QDateTimeAxis, QValueAxis +from PyQt5.QtCore import Qt, QTimer, QDateTime, QPointF +from PyQt5.QtGui import QPainter, QPen, QColor +from PyQt5.QtWidgets import QApplication +from psutil import cpu_percent + + +class CpuLineChart(QChart): + + def __init__(self, *args, **kwargs): + super(CpuLineChart, self).__init__(*args, **kwargs) + self.m_count = 10 + # 隐藏图例 + self.legend().hide() + self.m_series = QSplineSeries(self) + # 设置画笔 + self.m_series.setPen(QPen(QColor('#3B8CFF'), 2, Qt.SolidLine, Qt.RoundCap, Qt.RoundJoin)) + self.addSeries(self.m_series) + # x轴 + self.m_axisX = QDateTimeAxis(self) + self.m_axisX.setTickCount(self.m_count + 1) # 设置刻度数量 + self.m_axisX.setFormat('hh:mm:ss') # 设置时间显示格式 + now = QDateTime.currentDateTime() # 前10秒到现在 + self.m_axisX.setRange(now.addSecs(-self.m_count), now) + self.addAxis(self.m_axisX, Qt.AlignBottom) + self.m_series.attachAxis(self.m_axisX) + # y轴 + self.m_axisY = QValueAxis(self) + self.m_axisY.setLabelFormat('%d') # 设置文本格式 + self.m_axisY.setMinorTickCount(4) # 设置小刻度线的数目 + self.m_axisY.setTickCount(self.m_count + 1) + self.m_axisY.setRange(0, 100) + self.addAxis(self.m_axisY, Qt.AlignLeft) + self.m_series.attachAxis(self.m_axisY) + + # 填充11个初始点,注意x轴 需要转为秒的时间戳 + self.m_series.append( + [QPointF(now.addSecs(-i).toMSecsSinceEpoch(), 0) for i in range(self.m_count, -1, -1)]) + + # 定时器获取数据 + self.m_timer = QTimer() + self.m_timer.timeout.connect(self.update_data) + self.m_timer.start(1000) + + def update_data(self): + value = cpu_percent() + now = QDateTime.currentDateTime() + self.m_axisX.setRange(now.addSecs(-self.m_count), now) # 重新调整x轴的时间范围 + # 获取原来的所有点,去掉第一个并追加新的一个 + points = self.m_series.pointsVector() + points.pop(0) + points.append(QPointF(now.toMSecsSinceEpoch(), value)) + # 替换法速度更快 + self.m_series.replace(points) + + +if __name__ == '__main__': + app = QApplication(sys.argv) + chart = CpuLineChart() + chart.setTitle('cpu') + # chart.setAnimationOptions(QChart.SeriesAnimations) + + view = QChartView(chart) + view.setRenderHint(QPainter.Antialiasing) # 抗锯齿 + view.resize(800, 600) + view.show() + sys.exit(app.exec_()) diff --git a/QtChart/README.md b/QtChart/README.md index 8330a7a..62271e5 100644 --- a/QtChart/README.md +++ b/QtChart/README.md @@ -16,6 +16,7 @@ - [横向百分比柱状图表](#13横向百分比柱状图表) - [散点图表](#14散点图表) - [图表主题动画](#15图表主题动画) + - [CPU动态折线图](#16CPU动态折线图) ## 1、折线图 [运行 LineChart.py](LineChart.py) @@ -94,4 +95,11 @@ ## 15、图表主题动画 [运行 ChartThemes.py](ChartThemes.py) -![ChartThemes](ScreenShot/ChartThemes.gif) \ No newline at end of file +![ChartThemes](ScreenShot/ChartThemes.gif) + +## 16、CPU动态折线图 +[运行 CpuLineChart.py](CpuLineChart.py) + +通过设置x轴的时间范围并替换y点达到动态移动效果 + +![CpuLineChart](ScreenShot/CpuLineChart.png) \ No newline at end of file diff --git a/QtChart/ScreenShot/CpuLineChart.png b/QtChart/ScreenShot/CpuLineChart.png new file mode 100644 index 0000000000000000000000000000000000000000..06cb3b2cfbf0a6f3a26e656a2902549cb83faa64 GIT binary patch literal 26408 zcmeFZ1yohr-ad>4DkUfq5()}POKlpZl@g>|8i`GJDJ|X7CEYCz(rg;ZO?P+aH@BX9 z-h0kHH{S7$_y7IJJ3a?)mMivJYpyw;`NVJO^HxF_{Vu^>BqSvC*CGPaNJuvxBOzUP zy?q_5S+n!i0l)5;iYQtjAz?Hj{$2~G#(0E;^cd;2z$+Qs*!2kqN121TtDT-GQQeUC z@SFF7M89QTyA|$xmrBV!Vu(tvZ>)4#4nAnIX04pRaaoo-YfXPx`M|JHZbE5GR$1zY zY?a{Gx{Maxu}pQm0besksJbKBr`T)b19?upx5U05!65Y%77~+M zT&As84krg)^tDANUFB07VwR}jIx$q7oHmZlxtZZF-1~wgk)KR=fcCUnp3}zt@zU{Mi@o1t* z{TiYLj)hrcv?@W9y!E>V&h+vHG7VVUj8_0YA86J8yA3Z#4Gj#USPUbEvyoiuZrjx$ zArVAz+3ot_GZ8#`Bt9@+VX>qY$UQVLu-C^kSYCIrVKZsBlvlO6N)m51q(~+la6Xvt zJUB6N(Z{p#JUy1tY_{q2^i+nb)L=X>tt%CHyX-Oe3vG6a^!M#G|P+Q8n`aZd)kMz zbqGwx9Lym@%A6!WyU0zdkh-a?qT6`*=~16G1;t- zm@UQGC`CLYO%V?4)-C?v63%-*gGq7%+Tn1-Y_262oPVJs+=S6?cfNemUbOu?X|Q)l z&y7TpvzTP$_?ibwr5^@on|+~G8>}`hcRl!U)ohcD;hfg%Y>7RMuD4zaXfJj~&6pmq zq$gOXQ)8{1sTm)xk6J8t+Rge<1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Xy^tBYs*86i;-l{)=U}--->|iM~1iFQ>ux=4MK1n&YQHe8kF;bNK~j z5T32D+BP!JdVJWNHga~iqe0DAv1cpaK`jL9=L&oK;EXh?bwGa5V|LYUeJnNhX!iIHS5s5rD-hcV2KD2YSG{?;YcVcITZijO9Wg z3^uwD!Z;kYohot7bAV&4U4L_WW95FAjN{czCs`a-Ef z;xlSsd;>5+Ygl$f9lOB&>I1w%D#6oLel(;`{&mz5# z0)jWQ@q2Ctvpe}0_#?k2cl0;(*Y9QUI%!%&^tJh9u$XmOE)LD-XWkA~q_Jbn{F;Tt z#HJD*50U%vSV?w)24YC8&quvOK=r?n-hfN!P$1@?OV~dsp6|>>+dtq->MJnr5QN=v zOMdbPzQ@G>zi8~gqvVl2mr(zf_$coo27G^fFfe`CI-&!D8qfTIE31rz`ZJy|sLA5HJ2{U5yjPu71LdH%71_s?Vvv^}rx-l5DY1!x>j@9mt< zgMG#)cJrOC8*sa7G;`*U4KW_IQ-;X1ms7jk*cCg>*ks#x??!(6ThRXWbwTP;=_ot< je{Z^4aen?X>j>z|dJ)HNF*{8N0AQqVdZ+C6lZgKTJG1?z literal 0 HcmV?d00001 diff --git a/README.md b/README.md index 8fcad0b..acf26fc 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,7 @@ https://pyqt.site 论坛是专门针对PyQt5学习和提升开设的网站,分 - [横向百分比柱状图表](QtChart/HorizontalPercentBarChart.py) - [散点图表](QtChart/ScatterChart.py) - [图表主题动画](QtChart/ChartThemes.py) + - [CPU动态折线图](QtChart/CpuLineChart.py) - [QtDataVisualization](QtDataVisualization) - [柱状图3D](QtDataVisualization/BarsVisualization.py)