Slow matplotlib and ipywidgets image refresh
问题 I'm trying to scroll through some magnetic resonance slices using plt.show() and ipywidgets interact() function. I've found no problem by slowly moving the slider, but an important delay is found when sliding through the slices a little bit faster. Here below is the code I'm using. def dicom_animation(x, volume): fig = plt.figure(figsize=(8,8)) plt.imshow(volume['slices'][x]['pixel_array'], cmap=plt.cm.gray) interact(dicom_animation, volume = fixed(a), x=IntSlider(round(len(a['slices'])/2,0),