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

Error returned from quicklook() #511

Closed
eblur opened this issue Dec 7, 2018 · 3 comments
Closed

Error returned from quicklook() #511

eblur opened this issue Dec 7, 2018 · 3 comments

Comments

@eblur
Copy link

eblur commented Dec 7, 2018

In a recent run of the Astropy tutorial, FITS-cubes, I'm getting an error from matplotlib

Versions:

matplotlib                3.0.1            py36h54f8f79_0  
spectral-cube             0.4.3                      py_1    astropy
aplpy                     1.1.1                    py36_1    astropy

Error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/anaconda3/envs/astropy-tutorials/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)
    339                 pass
    340             else:
--> 341                 return printer(obj)
    342             # Finally look for special method names
    343             method = get_real_method(obj, self.print_method)

/anaconda3/envs/astropy-tutorials/lib/python3.6/site-packages/IPython/core/pylabtools.py in <lambda>(fig)
    242 
    243     if 'png' in formats:
--> 244         png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
    245     if 'retina' in formats or 'png2x' in formats:
    246         png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))

/anaconda3/envs/astropy-tutorials/lib/python3.6/site-packages/IPython/core/pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs)
    126 
    127     bytes_io = BytesIO()
--> 128     fig.canvas.print_figure(bytes_io, **kw)
    129     data = bytes_io.getvalue()
    130     if fmt == 'svg':

/anaconda3/envs/astropy-tutorials/lib/python3.6/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, **kwargs)
   2051                     bbox_artists = kwargs.pop("bbox_extra_artists", None)
   2052                     bbox_inches = self.figure.get_tightbbox(renderer,
-> 2053                             bbox_extra_artists=bbox_artists)
   2054                     pad = kwargs.pop("pad_inches", None)
   2055                     if pad is None:

/anaconda3/envs/astropy-tutorials/lib/python3.6/site-packages/matplotlib/figure.py in get_tightbbox(self, renderer, bbox_extra_artists)
   2274         bb.extend(
   2275             ax.get_tightbbox(renderer, bbox_extra_artists=bbox_extra_artists)
-> 2276             for ax in self.axes if ax.get_visible())
   2277 
   2278         if len(bb) == 0:

/anaconda3/envs/astropy-tutorials/lib/python3.6/site-packages/matplotlib/figure.py in <genexpr>(.0)
   2274         bb.extend(
   2275             ax.get_tightbbox(renderer, bbox_extra_artists=bbox_extra_artists)
-> 2276             for ax in self.axes if ax.get_visible())
   2277 
   2278         if len(bb) == 0:

TypeError: get_tightbbox() got an unexpected keyword argument 'bbox_extra_artists'
@keflavich
Copy link
Contributor

cc @astrofrog

@keflavich
Copy link
Contributor

I can reproduce this and I've added a test that does. The issue only affects matplotlib 3.0.1; it is fixed in 3.0.2:
matplotlib/matplotlib#12635
at least, in theory. I can't test this because I can't build matplotlib locally...

@keflavich
Copy link
Contributor

closed by #512. I think.

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

No branches or pull requests

2 participants