1 Star 0 Fork 0

小林博士/pltgui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

pltgui

Author: Dr Jie Zheng & Dr Lin-qiao Jiang v0.1 2022 v0.2 2023R

Introduction

Working with a GUI, or adding interaction in plotting, will help a lot in data analysis. However, the common GUI of Python is OS-dependent, while manually adding interactive codes is too complex. A pseudo-GUI tool is introduced in this work. It will help to add buttons/checkers in the graph and assign callback functions to them. The remaining problem is that the documents in this package are in Chinese and will be in English in the next version. This program is published to the PyPI, and can be installed by 'pip install pltgui'.

This package provides a button class and a button controller nager class. A button will be drawn on a specified position with a specified size, text and color. A callback function as the click event handler can be bind to the button. The button controller will help to adjust the axes, and control the message loop, call the event handler when the button is clicked.

Since we are using the native matplotlib plotting, it is OS-independent. Programs using this package has same behaviour on macOS, Linux, and Windows.

一个用matplotlib画按钮到图形界面,用于在科学图像绘制之外额外增加互动操作功能。 目前很简单,只提供了按钮,以及按钮的颜色等(可以当复选框用)。

由于使用matplotlib,而不是专门的图形界面,因此可以在任何具有交互能力的操作系统上使用, 经过实测,在macOS,Linux,Windows上均可以很好地实现互动操作。

Sample 范例

See sample.py and sample-calc.py.

sample.pysample-calc.py

MIT License Copyright (c) 2023 小林博士 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

A GUI with matplotlib 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/drjiezheng/pltgui.git
git@gitee.com:drjiezheng/pltgui.git
drjiezheng
pltgui
pltgui
master

搜索帮助

A270a887 8829481 3d7a4017 8829481