当前位置:网站首页>kivy教程之在 Kivy App 中使用 matplotlib 的示例
kivy教程之在 Kivy App 中使用 matplotlib 的示例
2022-07-03 00:46:00 【知识大胖】
我们想在我们的 GUI 应用程序中添加数据可视化模块是很常见的。在 Kivy 中,可以使用 garden.matplotlib 来实现。但是没有一个很好的例子来说明如何在实际应用程序中使用它。我在stackoverflow上遇到了这个帖子,并认为这是一个很好的例子,可以用作模板。所以我根据答案和评论更新了代码以使其工作。您可以在下面的 gif 中查看详细信息:

from kivy.properties import ObjectProperty
from kivy.uix.screenmanager import ScreenManager, Screen
from kivymd.app import MDApp
from kivymd.uix.expansionpanel import MDExpansionPanel, MDExpansionPanelOneLine
from kivy.uix.boxlayout import BoxLayout
import matplotlib.pyplot as plt
from kivy.garden.matplotlib.backend_kivyagg import FigureCanvasKivyAgg
from kivy.uix.image import Image
from kivy.lang import Builder
kv_str = """
<WindowManager>:
LoginWindow:
TravelManagerWindow:
<LoginWindow>:
name: 'login'
MDRaisedButton:
text: 'Enter'
pos_hint: {'center_x': 0.5, '边栏推荐
- 这不平凡的两年,感谢我们一直在一起!
- Strongly connected components of digraph
- Embrace the safety concept of platform delivery
- Kubernetes resource object introduction and common commands (V) - (NFS & PV & PVC)
- Asynchronous, email and scheduled tasks
- [case sharing] let the development of education in the new era advance with "number"
- [AUTOSAR five methodology]
- Cut point of undirected graph
- Assets, vulnerabilities, threats and events of the four elements of safe operation
- [AUTOSAR XIII NVM]
猜你喜欢
![[AUTOSAR nine c/s principle Architecture]](/img/59/ce32c0ff58ef5d8385fe950136175b.png)
[AUTOSAR nine c/s principle Architecture]

异步、邮件、定时三大任务

MySQL

Trois tâches principales: asynchrone, courrier et timing

详解RDD基本概念、RDD五大属性

Deep analysis of data storage in memory

Find a benchmark comrade in arms | a million level real-time data platform, which can be used for free for life
![[AUTOSAR VI description document]](/img/3d/1382acbc4054ab218485a12b7b4e6b.png)
[AUTOSAR VI description document]

指针初阶(基础)

Arduino开发之按键检测与正弦信号输出
随机推荐
MongoDB系列之MongoDB常用命令
[overview of AUTOSAR three RTE]
Leetcode-934: the shortest Bridge
Leetcode-849: maximum distance to the nearest person
解决ReactNative使用webView存在缓存问题
Usage of using clause in kingbases alter table
深度剖析数据在内存中的存储
Leetcode-2115: find all the dishes that can be made from the given raw materials
Inversion de l'intervalle spécifié dans la liste des liens
[overview of AUTOSAR four BSW]
FPGA - 7系列 FPGA内部结构之Clocking -04- 多区域时钟
First hand evaluation of Reza electronics rz/g2l development board
正确甄别API、REST API、RESTful API和Web Service之间的异同
R language generalized linear model function GLM, (model fit and expression diagnostics), model adequacy evaluation method, use plot function and car package function
MySQL基础用法02
leetcode:701. 二叉搜索树中的插入操作【bst的插入】
Win10 can't be installed in many ways Problems with NET3.5
The arm core board / development board of Feiling equipped with Ti am62x made its debut in embedded world 2022
Delete duplicate elements in the ordered linked list -ii
465. 最优账单平衡 DFS 回溯