Closed
Description
I was wondering why some of my docstring examples are not rendered, until I found that import matplotlib.pyplot as plt
works, while from matplotlib import pyplot as plt
does not, since numpydoc explicitly checks if a string contains import matplotlib
.
Aside from import conventions, it would be desirable to have a more flexible plot detection, since a lot of projects have high-level wrappers around matplotlib. For example, our project has a "show" function, which plots simulation results on arbitrary finite element meshes (and imports mpl internally).
Metadata
Metadata
Assignees
Labels
No labels