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
importmatplotlib.pyplotaspltimportnumpyasnpfrommplsignal.freq_plotsimportfreqz_firfig, ax=plt.subplots() # <--- Removing this line from the MRE will make the code run as expecteda=np.zeros(10)
a[0] =1.0fig=freqz_fir(a)
Traceback (most recent call last):
Cell In[1], line 9
fig = freqz_fir(a)
File ~/education/tste87/2024/basic-venv/lib/python3.11/site-packages/mplsignal/freq_plots.py:529 in freqz_fir
return freqz(num=num, den=np.array([1.0]), **kwargs)
File ~/education/tste87/2024/basic-venv/lib/python3.11/site-packages/mplsignal/freq_plots.py:144 in freqz
return _plot_h(
File ~/education/tste87/2024/basic-venv/lib/python3.11/site-packages/mplsignal/freq_plots.py:214 in _plot_h
raise ValueError("Must have at least two axes for 'stacked' or 'twin'.")
ValueError: Must have at least two axes for 'stacked' or 'twin'.
Version info:
Muxen computer lab, with Conda installation:
Matplotlib: 3.8.4
Python 3.11.7
MPLSignal: 0.2.0
The text was updated successfully, but these errors were encountered:
You create a figure with one axes and then try to add two subplots, which the error message clearly states, so not sure if one can do anything about this. (Except correct the example.)
MRE:
Version info:
Muxen computer lab, with Conda installation:
The text was updated successfully, but these errors were encountered: