当前位置:网站首页>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, '边栏推荐
- Leetcode-871: minimum refueling times
- [introduction to AUTOSAR seven tool chain]
- 1696C. Fishingprince Plays With Array【思维题 + 中间状态 + 优化存储】
- Leetcode-849: maximum distance to the nearest person
- Linear programming of mathematical modeling (including Matlab code)
- The R language uses the ctree function in the party package to build conditional inference decision trees, uses the plot function to visualize the trained conditional inference decision tree, and the
- Test shift right: Elk practice of online quality monitoring
- Find a benchmark comrade in arms | a million level real-time data platform, which can be used for free for life
- Compare version number
- How to convert Quanzhi a40i/t3 to can through SPI
猜你喜欢

tail -f 、tail -F、tailf的区别

excel去除小数点后面的数据,将数字取整

Find a benchmark comrade in arms | a million level real-time data platform, which can be used for free for life

Infrared thermography temperature detection system based on arm rk3568

Deep analysis of data storage in memory

【FPGA教程案例6】基于vivado核的双口RAM设计与实现

深度剖析数据在内存中的存储

FPGA - 7 Series FPGA internal structure clocking -04- multi area clock

2022.2.14 resumption

ROS2之ESP32简单速度消息测试(极限频率)
随机推荐
18_微信小程序之微信视频号滚动自动播放视频效果实现2.0
鏈錶內指定區間反轉
excel去除小数点后面的数据,将数字取整
这不平凡的两年,感谢我们一直在一起!
[flutter] icons component (fluttericon Download Icon | customize SVG icon to generate TTF font file | use the downloaded TTF icon file)
Lu Zhe, chief scientist of Shiping information: building data and personnel centered security capabilities
Key detection and sinusoidal signal output developed by Arduino
深度剖析数据在内存中的存储
Leetcode-2280: represents the minimum number of line segments of a line graph
excel IF公式判断两列是否相同
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
Strongly connected components of digraph
[AUTOSAR five methodology]
[case sharing] let the development of education in the new era advance with "number"
Basic use of sringcloud & use of component Nacos
leetcode-871:最低加油次数
Reading and writing speed of Reza rz/g2l arm development board storage and network measurement
matlab 多普勒效应产生振动信号和处理
【爱死机】《吉巴罗》被忽略的细节
MySQL