1 Star 0 Fork 0

小林博士/pltgui

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
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.

About

A GUI with matplotlib expand collapse
Python
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/drjiezheng/pltgui.git
git@gitee.com:drjiezheng/pltgui.git
drjiezheng
pltgui
pltgui
master

Search