1 Star 2 Fork 0

森本木/serialplot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
serialplot.py 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
"""
Program to plot serial data in real time. Once the root window is created and
configured, all other actions occur within the ConfigFrame and GraphTopLevel
"""
import matplotlib
matplotlib.use('TkAgg')
import os
from cfgWindow import *
root = tk.Tk()
#Hide the window so we can't see it jump to the middle
root.withdraw()
#Add the configuration frame to the root
root.CfgFrm = ConfigFrame(root)
root.CfgFrm.pack(side='top', fill='both', expand=True)
#Move the root to the center of the screen
root.update()
scrwidth = root.winfo_screenwidth()
scrheight = root.winfo_screenheight()
winwidth = root.winfo_reqwidth()
winheight = root.winfo_reqheight()
winposx = int(round(scrwidth/2 - winwidth/2))
winposy = int(round(scrheight/2 - winheight/2))
root.geometry('{}x{}+{}+{}'.format(winwidth, winheight, winposx, winposy))
#Set the title and icon and stuff
root.title('Serial Plotter Configuration')
if os.name == 'nt':
root.iconbitmap(default='graphs.ico')
root.resizable(width=False, height=False)
#Unhide the window now that it's configured
root.deiconify()
#Run the mainloop. All the other code is executed in class __init__ or event bindings
root.mainloop()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/senbenmu/serialplot.git
git@gitee.com:senbenmu/serialplot.git
senbenmu
serialplot
serialplot
master

搜索帮助