karlwessel / mplopengl

OpenGL based backend for matplotlib
MIT License
14 stars 5 forks source link

plt.show() not working? #17

Closed JakkuSakura closed 2 days ago

JakkuSakura commented 3 years ago

I find that plt.show() is not working for mplopengl, even with plt.ion(). Is this a feature or bug? I can use plt.pause() temperorily instead.

import matplotlib
# matplotlib.use("Qt5Agg")
matplotlib.use('module://mplopengl.backend_qtgl')
import numpy as np
from matplotlib import pyplot as plt
sample_size = 100000
X = np.linspace(100079, 100090, sample_size)
Y = np.random.random(sample_size)

fig, (ax1) = plt.subplots(1, 1, sharex=True, sharey=True)

ax1.plot(X, Y, linestyle='solid', marker='*')
plt.ion()
plt.show()
# plt.pause(30)
if __name__ == '__main__':
    pass
karlwessel commented 2 days ago

This seems to have been fixed at some point. At least the example works fine now. (sorry for the late response).