当前位置:网站首页>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, '边栏推荐
- 详解RDD基本概念、RDD五大属性
- 2022 Jiangxi Provincial Safety Officer B certificate reexamination examination and Jiangxi Provincial Safety Officer B certificate simulation examination question bank
- MongoDB系列之MongoDB常用命令
- Niu Ke swipes questions and clocks in
- MySQL --- 数据库查询 - 条件查询
- How to convert Quanzhi a40i/t3 to can through SPI
- 按键精灵打怪学习-自动寻路回打怪点
- 删除有序链表中重复的元素-II
- 【FPGA教程案例6】基于vivado核的双口RAM设计与实现
- Usage of using clause in kingbases alter table
猜你喜欢

What is needed to develop a domestic arm intelligent edge computing gateway

MySQL foundation 05 DML language

攻克哈希的基本概念与实现

2022.2.14 resumption

有向图的强连通分量

数学建模之线性规划(含MATLAB代码)
![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]

异步、郵件、定時三大任務

Matlab saves the digital matrix as geospatial data, and the display subscript index must be of positive integer type or logical type. Solve the problem

【我的OpenGL学习进阶之旅】关于欧拉角、旋转顺序、旋转矩阵、四元数等知识的整理
随机推荐
dotConnect for PostgreSQL数据提供程序
Kivy教程大全之如何在 Kivy 中创建下拉列表
异步、邮件、定时三大任务
Excel if formula determines whether the two columns are the same
鏈錶內指定區間反轉
链表中的节点每k个一组翻转
安全运营四要素之资产、脆弱性、威胁和事件
[AUTOSAR VI description document]
按键精灵打怪学习-多线程后台坐标识别
Leetcode 6103 - minimum fraction to delete an edge from the tree
matlab查找某一行或者某一列在矩阵中的位置
Mongodb common commands of mongodb series
Solve the cache problem of reactnative using WebView
Appuyez sur l'apprentissage de l'esprit de frappe - reconnaissance des coordonnées de fond multithreadées
Every k nodes in the linked list are flipped
Usage of using clause in kingbases alter table
【第29天】给定一个整数,请你求出它的因子数
[love crash] neglected details of gibaro
Basic remote connection tool xshell
Makefile中wildcard、patsubst、notdir的含义