You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This arises in part of the display code, when calling e.g. some_instrument.calc_psf(display=True):
/Users/mperrin/software/poppy/poppy/poppy_core.py:518: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
Usually that shows up over and over again for each wavelength in a polychromatic calculation.
The original behavior and intent of this part of the code was to re-plot each wavelength as it's calculated, in a plot window that is updated again for each wavelength, overwriting the previous plots and reusing the axes for each wavelength. This doesn't achieve much now with the Jupyter framework in which plots are just sent at the end of the whole cell running. (It maybe still behaves in the original way if used in one of the interactive backends like TkAgg? Not sure!)
We either need to make this smarter about axes to avoid that matplotlib deprecation warning, or else completely shortcut around the re-plotting if using the Jupyter backend, and just plot one wavelength for instance.
The text was updated successfully, but these errors were encountered:
This arises in part of the display code, when calling e.g.
some_instrument.calc_psf(display=True)
:Usually that shows up over and over again for each wavelength in a polychromatic calculation.
The original behavior and intent of this part of the code was to re-plot each wavelength as it's calculated, in a plot window that is updated again for each wavelength, overwriting the previous plots and reusing the axes for each wavelength. This doesn't achieve much now with the Jupyter framework in which plots are just sent at the end of the whole cell running. (It maybe still behaves in the original way if used in one of the interactive backends like TkAgg? Not sure!)
We either need to make this smarter about axes to avoid that matplotlib deprecation warning, or else completely shortcut around the re-plotting if using the Jupyter backend, and just plot one wavelength for instance.
The text was updated successfully, but these errors were encountered: