A Matplotlib backend for working with (Q)Threads and Qt
Project description
A Matplotlib backend for working with (Q)Threads and Qt
Free software: 3-clause BSD license
Documentation: (COMING SOON!) https://tacaswell.github.io/mpl-qtthread.
Features
A minimal example:
import threading
import time
import mpl_qtthread.backend
import matplotlib
import matplotlib.backends.backend_qt
mpl_qtthread.backend.initialize_qt_teleporter()
matplotlib.use("module://mpl_qtthread.backend_agg")
import matplotlib.pyplot as plt
plt.ion()
def background():
# time.sleep(1)
fig, ax = plt.subplots()
(ln,) = ax.plot(range(5))
for j in range(5):
print(f"starting to block {j}")
ln.set_color(f"C{j}")
ax.set_title(f'cycle {j}')
fig.canvas.draw_idle()
time.sleep(5)
threading.Thread(target=background).start()
matplotlib.backends.backend_qt.qApp.exec()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mpl-qtthread-0.0.1.tar.gz
(17.2 kB
view hashes)
Built Distribution
Close
Hashes for mpl_qtthread-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2807deb2b70ce1f46e9da454af1770ad27bc80b74b758d578a418dd78e69a70a |
|
MD5 | 512fbac260ba3bdc7b223781aca90622 |
|
BLAKE2b-256 | 1eed42f3535df2faba03ab45057221d8dca34fc6a20df673874b8ea5c24b1f03 |