When I create pcolormesh plot with big enough data, lasso selector (useblit=True) is redrawing very slowly. Don't have problem with this in version 3.4.2
import numpy as np from matplotlib.widgets import LassoSelector import matplotlib.pyplot as plt class SelectFromCollection: def __init__(self, ax): self.lasso = LassoSelector(ax, onselect=self.onselect, useblit=True) def onselect(self, verts): pass if __name__ == '__main__': fig, ax = plt.subplots() np.random.seed(19680801) Z = np.random.rand(1095, 100) x = np.arange(-0.5, 100, 1) # len = 11 y = np.arange(4.5, 1100, 1) # len = 7 ax.pcolormesh(x, y, Z) # data2d = np.random.randint(0, 100,(1000,1000)) # ax.imshow(data2d) selector = SelectFromCollection(ax) plt.show()
Slow lasso drawing
Quick lasso drawing :)
If imshow is used, lasso selector is acting normaly.
Ubuntu 20.04
3.5.1
QtAgg
3.8
No response
Is it really the lasso selector that's the problem, or is it something like #21917?
I think this is the same as #21917, but I don't think that the fix in #21917 fixed the problem for zoom.
This bisects to d9bb0a2 , #19908
Activity
QuLogic commented on Feb 24, 2022
Is it really the lasso selector that's the problem, or is it something like #21917?
jklymak commented on Mar 23, 2022
I think this is the same as #21917, but I don't think that the fix in #21917 fixed the problem for zoom.
jklymak commented on Mar 23, 2022
This bisects to d9bb0a2 , #19908