I have tried the command print(matplotlib.get_backend()) to get the backend and it says it is using Qt5Agg. I am not using a notebook (I changed to a code editor when I saw this: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework, as 'headless' is currently running).
These are my imports right now:
import matplotlib
matplotlib.use("Qt5Agg")
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.widgets import Slider, RangeSlider, RadioButtons, TextBox
import numpy as np
What surprises me the most is that yesterday I tried running this code in a jupyter notebook and it kind of worked (it was not interactive but at least it showed some graphics)...