当前位置:网站首页>Kivy tutorial - example of using Matplotlib in Kivy app
Kivy tutorial - example of using Matplotlib in Kivy app
2022-07-03 01:18:00 【Knowledge fatness】
We want to be in our GUI It is common to add a data visualization module to an application . stay Kivy in , have access to garden.matplotlib To achieve . However, there is no good example to illustrate how to use it in practical applications . I am here stackoverflow I met this post on , And think this is a good example , Can be used as a template . So I updated the code based on the answers and comments to make it work . You can find the following gif View details in :

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, '边栏推荐
- 链表内指定区间反转
- 基本远程连接工具Xshell
- Solve the cache problem of reactnative using WebView
- Basic concept and implementation of overcoming hash
- 【系统分析师之路】第五章 复盘软件工程(开发模型开发方法)
- excel IF公式判断两列是否相同
- [Androd] Gradle 使用技巧之模块依赖替换
- 【FPGA教程案例5】基于vivado核的ROM设计与实现
- [system analyst's road] Chapter V double disk software engineering (development model development method)
- Specified interval inversion in the linked list
猜你喜欢
![[untitled]](/img/fd/f6b90536f10325a6fdeb68dc49c72d.png)
[untitled]
![leetcode:871. Minimum refueling times [Pat has done before + maximum stacking + greed]](/img/2c/8ec3926243fac8db9ed45d8053f3af.png)
leetcode:871. Minimum refueling times [Pat has done before + maximum stacking + greed]

Understanding and distinguishing of some noun concepts in adjustment / filtering
![[AUTOSAR eight OS]](/img/ac/fbc84c077ff9c94c840e1871171d19.png)
[AUTOSAR eight OS]

【C语言】分支和循环语句(上)

12_微信小程序之微信视频号滚动自动播放视频效果实现

寻找标杆战友 | 百万级实时数据平台,终身免费使用

正确甄别API、REST API、RESTful API和Web Service之间的异同

每日一题之干草堆的移动

excel去除小数点后面的数据,将数字取整
随机推荐
链表中的节点每k个一组翻转
Draw love with go+ to express love to her beloved
[shutter] image component (configure local GIF image resources | load placeholder with local resources)
删除有序链表中重复的元素-II
MySQL --- 数据库查询 - 条件查询
FPGA - 7 Series FPGA internal structure clocking -04- multi area clock
How to convert Quanzhi a40i/t3 to can through SPI
matlab 多普勒效应产生振动信号和处理
[flutter] icons component (fluttericon Download Icon | customize SVG icon to generate TTF font file | use the downloaded TTF icon file)
无向图的割点
Solve the cache problem of reactnative using WebView
tp6快速安装使用MongoDB实现增删改查
数据分析思维分析犯法和业务知识——分析方法(一)
Assets, vulnerabilities, threats and events of the four elements of safe operation
Leetcode 6103 - minimum fraction to delete an edge from the tree
Excel if formula determines whether the two columns are the same
Asynchronous, email and scheduled tasks
Kivy教程大全之 创建您的第一个kivy程序 hello word(教程含源码)
MySQL foundation 06 DDL
如今少年已归来,人间烟火气最抚凡人心 复工了~