astropy / astroplan

Observation planning package for astronomers – maintainer @bmorris3
https://astroplan.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
198 stars 109 forks source link

AttributeError: 'AxesSubplot' object has no attribute 'set_theta_zero_location' #582

Closed danmoser closed 2 months ago

danmoser commented 2 months ago

I'm running astroplan.__version__ = '0.8' and when running the tutorial summer_triangle-3.py I get the error below:

---> 35 plot_sky(altair, subaru, start, style_kwargs=altair_style)
     36 plot_sky(vega, subaru, start)
     37 plot_sky(deneb, subaru, start, style_kwargs=deneb_style)

~/.local/lib/python3.8/site-packages/astropy/units/decorators.py in wrapper(*func_args, **func_kwargs)
    300             # Call the original function with any equivalencies in force.
    301             with add_enabled_equivalencies(self.equivalencies):
--> 302                 return_ = wrapped_function(*func_args, **func_kwargs)
    303 
    304             # Return

~/.local/lib/python3.8/site-packages/astroplan/plots/sky.py in plot_sky(target, observer, time, ax, style_kwargs, north_to_east_ccw, grid, az_label_offset, warn_below_horizon, style_sheet)
    163     # More axes set-up.
    164     # Position of azimuth = 0 (data, not label).
--> 165     ax.set_theta_zero_location('N')
    166 
    167     # Direction of azimuth increase. Clockwise is -1

AttributeError: 'AxesSubplot' object has no attribute 'set_theta_zero_location'
danmoser commented 2 months ago

That error happens with astropy.__version__ = '5.1'

Updating to astropy.__version__ = '6.1' solves the issue

HealthyPear commented 2 months ago

I don't think closing this issue as it is is a good idea: