- Notifications
You must be signed in to change notification settings - Fork22
Closed
Milestone
Description
... and it should not.
The visualization of plots in matplotlib change afternapari_matplotlib
has been imported. Global settingse.g. here should not be modified by a napari-plugin. Consider programming napari-pluginsside-effect free.
To reproduce:
import matplotlib.pyplot as pltimport numpy as npimage = np.random.random((3,3))plt.imshow(image)
import napari_matplotlibplt.imshow(image)
The same can be observed when not importingnapari_matplotlib
but instead opening a viewer wherenapari-stress is installed, because starting the viewer importsnapari_stress
and this importsnapari_matplotlib
in the background. A napari-plugin should not modify how things are displayed in jupyter notebooks. It's kind of evil usage of global variables.