I've run this code many times but now it's failing. Matplotlib won't work for any example, even the most trivial. This is the error I'm getting, but I'm not sure what to make of it. I know this is vague and I can't really provide a way to reproduce it. I've uninstalled every package I recently installed and tried reinstalling matplotlib.
fig = plt.figure()ax = fig.add_subplot(1, 1, 1)plt.plot(self.I_hist)plt.show()
File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/backends/backend_macosx.py", line 41, in _drawself.figure.draw(renderer)File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/artist.py", line 73, in draw_wrapperresult = draw(artist, renderer, *args, **kwargs)File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/artist.py", line 50, in draw_wrapperreturn draw(artist, renderer)File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/figure.py", line 2810, in drawmimage._draw_list_compositing_images(File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/image.py", line 132, in _draw_list_compositing_imagesa.draw(renderer)File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/artist.py", line 50, in draw_wrapperreturn draw(artist, renderer)File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/axes/_base.py", line 3020, in drawself._unstale_viewLim()File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/axes/_base.py", line 776, in _unstale_viewLimself.autoscale_view(**{f"scale{name}": scaleFile "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/axes/_base.py", line 2932, in autoscale_viewhandle_single_axis(File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/axes/_base.py", line 2895, in handle_single_axisx0, x1 = locator.nonsingular(x0, x1)File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/ticker.py", line 1654, in nonsingularreturn mtransforms.nonsingular(v0, v1, expander=.05)File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/matplotlib/transforms.py", line 2880, in nonsingularif maxabsvalue < (1e6 / tiny) * np.finfo(float).tiny:File "/Users/username/Documents/Newsvendor/venv/lib/python3.10/site-packages/numpy/core/getlimits.py", line 462, in __new__dtype = numeric.dtype(type(dtype))
TypeError: 'NoneType' object is not callable