question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should wcsaxes import trigger matplotlib.pyplot import?

See original GitHub issue

I see that at the moment

python -c 'import astropy.visualization.wcsaxes'

triggers a matplotlib.pyplot import and a GUI window popping up.

@astrofrog - Is this intentional? Is it possible / wouldn’t it be better to avoid this?

What if there’s library code or pipeline scripts that wants to import astropy.visualization.wcsaxes, but doesn’t want to import matplotlib.pyplot and all the stuff that entails (like setting a backend and by default popping up a GUI window)?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
cdeilcommented, Jan 9, 2017

http://matplotlib.org/faq/usage_faq.html#non-interactive-example

Nothing happened–or at least nothing has shown up on the screen (unless you are using macosx backend, which is anomalous).

😃

0reactions
cdeilcommented, Jan 9, 2017

Ah, I see there’s #5684 by @astrofrog already. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Making plots with world coordinates (WCSAxes) — Astropy v5.2
Getting started¶. The following is a very simple example of plotting an image with the WCSAxes package: import matplotlib.pyplot ...
Read more >
Event handling and picking — Matplotlib 3.6.2 documentation
On the button release event, just reset all the button press data you stored as None. Here is the solution: import numpy as...
Read more >
Plotting in sunpy — SunPy 4.1.0 documentation
import matplotlib.pyplot as plt plt.plot(range(10), ... When you create a plot with peek or plot , sunpy will use astropy.visualization.wcsaxes to represent ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found