https://github.com/swvanbuuren/mlpyqtgraph
  
  
    Matplotlib like plotting with pyqtgraph in python 
    https://github.com/swvanbuuren/mlpyqtgraph
  
interactive-plotting matplotlib plotting plotting-in-python pqthreads pyqtgraph pyside python qt-for-python
        Last synced: 7 months ago 
        JSON representation
    
Matplotlib like plotting with pyqtgraph in python
- Host: GitHub
- URL: https://github.com/swvanbuuren/mlpyqtgraph
- Owner: swvanbuuren
- License: mit
- Created: 2022-06-02T18:18:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-26T14:29:36.000Z (8 months ago)
- Last Synced: 2025-04-12T17:50:40.350Z (7 months ago)
- Topics: interactive-plotting, matplotlib, plotting, plotting-in-python, pqthreads, pyqtgraph, pyside, python, qt-for-python
- Language: Python
- Homepage: https://swvanbuuren.github.io/mlpyqtgraph/
- Size: 770 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 7
- 
            Metadata Files:
            - Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
 
Awesome Lists containing this project
README
          # mlpyqtgraph
mlpyqtgraph enables [matplotlib](https://matplotlib.org/)-like plotting with
[pyqtgraph](https://github.com/pyqtgraph/pyqtgraph) in existing python programs.
It relies on [pqthreads](https://github.com/swvanbuuren/pqthreads) to separate mlpyqtgraph's plotting functionality from the existing python program, by separating them in different `Qthread`s.
Checkout the [documentation's
introduction](https://swvanbuuren.github.io/mlpyqtgraph/introduction/) for more
background information.
## Getting started
### Installation
First, install mlpyqtgraph like any other python package using `pip`:
``` bash
pip install mlpyqtgraph
```
Detailed installation instructions are found in the
[documentation](https://swvanbuuren.github.io/mlpyqtgraph/installation/).
### Usage
To use mlpyqtgraph, decorate your main function with mlpyqtgraph's `plotter`
decorator. This diverts the existing python program into a dedicated thread,
while using the main thread solely for plotting with pyqtgraph.
Now you can use mlpyqtgraph's plot functionalities inside your decorated
function. A python program that shows a very basic plot could look like this:
```python
import mlpyqtgraph as mpg
@mpg.plotter
def main():
    """ Minimal mlpyqtgraph example """
    mpg.plot(range(5), (1, 3, 2, 0, 5))
if __name__ == '__main__':
    main()
```
## Examples
Please refer to the [examples](/examples) for a few applications of mlpyqtgraph.
## Documentation
Check out the [documentation](https://swvanbuuren.github.io/mlpyqtgraph/)!
Please note that it's currently still under construction.
## Pre-commit hooks
This repository comes with pre-commit hooks, which are stored in
[`.hooks`](.hooks). To enable the hooks issue:
```bash
git config --local core.hooksPath .hooks/
```
## License
An MIT style license applies for mlpyqtgraph, see the [LICENSE](LICENSE) file
for more details.