Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matplotlib.pyplot needs to be imported in axes.py for set_figax #9

Open
SebastienRietteMTO opened this issue Nov 22, 2024 · 0 comments · May be fixed by #10
Open

matplotlib.pyplot needs to be imported in axes.py for set_figax #9

SebastienRietteMTO opened this issue Nov 22, 2024 · 0 comments · May be fixed by #10

Comments

@SebastienRietteMTO
Copy link

Describe the bug
Using set_figax raise an error if matplotlib.pyplot was not imported before

To Reproduce
Paro is an epygram field

Paro.scatter_with(Paro)
Traceback (most recent call last):
File "", line 1, in
File "/home/riette/EPyGrAM/src/epygram/fields/D3Field.py", line 1665, in scatter_with
fig, ax = set_figax(fig, ax, figsize=figsize)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/riette/.epygram/vortex/site/bronx/graphics/axes.py", line 22, in set_figax
plt = matplotlib.pyplot
^^^^^^^^^^^^^^^^^
File "/home/riette/virtualenvs/A/lib/python3.12/site-packages/matplotlib/_api/init.py", line 217, in getattr
raise AttributeError(
AttributeError: module 'matplotlib' has no attribute 'pyplot'

Expected behavior
No exception

Environment (please complete the following information):

  • Python version: 3.12.13, matplotlib 3.9.2
  • OS: linux

Additional context
Add any other context about the problem here.

SebastienRietteMTO added a commit to SebastienRietteMTO/EPyGrAM that referenced this issue Nov 27, 2024
@AlexandreMary AlexandreMary linked a pull request Dec 13, 2024 that will close this issue
@AlexandreMary AlexandreMary linked a pull request Dec 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant