当前位置:网站首页>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, '
边栏推荐
- 按键精灵打怪学习-多线程后台坐标识别
- excel去除小数点后面的数据,将数字取整
- 【FH-GFSK】FH-GFSK信号分析与盲解调研究
- 12_ Implementation of rolling automatic video playback effect of wechat video number of wechat applet
- MySQL --- 数据库查询 - 条件查询
- Correctly distinguish the similarities and differences among API, rest API, restful API and web service
- Basis of information entropy
- leetcode:871. Minimum refueling times [Pat has done before + maximum stacking + greed]
- 【FPGA教程案例6】基于vivado核的双口RAM设计与实现
- 465. DFS backtracking of optimal bill balance
猜你喜欢
随机推荐
【C语言】分支和循环语句(上)
Rk3568 development board evaluation (II): development environment construction
[love crash] neglected details of gibaro
Inversion de l'intervalle spécifié dans la liste des liens
MySQL
18_微信小程序之微信视频号滚动自动播放视频效果实现2.0
Now that the teenager has returned, the world's fireworks are the most soothing and ordinary people return to work~
按键精灵打怪学习-自动回城路线的判断
Database SQL language 02 connection query
【FPGA教程案例6】基于vivado核的双口RAM设计与实现
按键精灵打怪学习-自动寻路回打怪点
JDBC courses
Meibeer company is called "Manhattan Project", and its product name is related to the atomic bomb, which has caused dissatisfaction among Japanese netizens
Mongodb common commands of mongodb series
(C语言)数据的存储
ThinkPHP+Redis实现简单抽奖
MySQL foundation 04 MySQL architecture
Delete duplicate elements in the ordered linked list -ii
How to convert Quanzhi a40i/t3 to can through SPI
R language ggplot2 visualization: use ggplot2 to display dataframe data that are all classified variables in the form of thermal diagram, and customize the legend color legend of factor