solo-spice / sospice

Python data analysis tools for the SPICE extreme-UV spectrometer on Solar Orbiter
BSD 3-Clause "New" or "Revised" License
12 stars 5 forks source link

Plotting FOVs in a notebook outputs 2 FOVs #45

Open ebuchlin opened 6 months ago

ebuchlin commented 6 months ago

With this code in a Jupyter notebook:

import matplotlib.pyplot as plt
from sospice import Catalog, plot_fovs_with_background
%matplotlib widget
cat = Catalog(release_tag='4.0')
result = cat.find_files(
  soopname="L_SMALL_HRES_HCAD_Slow-Wind-Connection",
  date_min="2022-03-01",
  date_max="2022-03-10"
)
plot_fovs_with_background(result, 'EUI/FSI')

the plot is displayed twice (although the return value from plot_fovs_with_background() is (None, None).

The issue disappears with

plot_fovs_with_background(result, 'EUI/FSI', show=False)
plt.show()

which is counter-intuitive, or with the inline (default) backend.