当前位置:网站首页>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, '边栏推荐
- R language ggplot2 visual faceting, visual facet_wrap bar plot, using strip Text function customize the size of the strip of each facet title in the facet graph (cutimi
- 【我的OpenGL学习进阶之旅】关于欧拉角、旋转顺序、旋转矩阵、四元数等知识的整理
- Leetcode 6103 - minimum fraction to delete an edge from the tree
- Find a benchmark comrade in arms | a million level real-time data platform, which can be used for free for life
- MySQL foundation 05 DML language
- Correctly distinguish the similarities and differences among API, rest API, restful API and web service
- 按键精灵打怪学习-多线程后台坐标识别
- Excel removes the data after the decimal point and rounds the number
- R language generalized linear model function GLM, (model fit and expression diagnostics), model adequacy evaluation method, use plot function and car package function
- 攻克哈希的基本概念与实现
猜你喜欢
![[love crash] neglected details of gibaro](/img/d6/baa4b5185ddaf88f3df71a94a87ee2.jpg)
[love crash] neglected details of gibaro

【无标题】

JS inheritance and prototype chain

Basis of information entropy

(C language) data storage

Understanding and distinguishing of some noun concepts in adjustment / filtering

FPGA - 7系列 FPGA内部结构之Clocking -04- 多区域时钟

RISA rz/g2l processor introduction | frame diagram | power consumption | schematic diagram and hardware design guide

Telephone network problems

【C语言】分支和循环语句(上)
随机推荐
Appuyez sur l'apprentissage de l'esprit de frappe - reconnaissance des coordonnées de fond multithreadées
Draw love with go+ to express love to her beloved
Telephone network problems
Excel if formula determines whether the two columns are the same
按键精灵打怪学习-回城买药加血
JDBC courses
Cut point of undirected graph
kivy教程之在 Kivy App 中使用 matplotlib 的示例
电话网络问题
leetcode 2097 — 合法重新排列数对
[AUTOSAR eight OS]
Matlab finds the position of a row or column in the matrix
SwiftUI 组件大全之使用 SceneKit 和 SwiftUI 构建交互式 3D 饼图(教程含源码)
Compare version number
465. 最优账单平衡 DFS 回溯
Androd Gradle 对其使用模块依赖的替换
MySQL
MySQL --- 数据库查询 - 基本查询
Strongly connected components of digraph
[system analyst's road] Chapter V double disk software engineering (development model development method)