diff --git a/CHANGES.rst b/CHANGES.rst index a998cc77..df87a546 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,7 +7,7 @@ - Fix ``Observer`` not having longtitude, latitude, and elevation parameters as class attributes. They are now properties calculated from the ``location``. -- Documentation revisions and theme update +- Documentation revisions and theme update [#563] 0.8 (2021-01-26) ---------------- diff --git a/astroplan/plots/sky.py b/astroplan/plots/sky.py index 8b373762..751f1fe6 100644 --- a/astroplan/plots/sky.py +++ b/astroplan/plots/sky.py @@ -1,7 +1,4 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst -from __future__ import (absolute_import, division, print_function, - unicode_literals) - import numpy as np import astropy.units as u from astropy.time import Time @@ -120,7 +117,8 @@ def plot_sky(target, observer, time, ax=None, style_kwargs=None, if isinstance(plt.gca(), plt.PolarAxes): ax = plt.gca() else: - fig, ax = plt.subplots(subplot_kw={'projection': 'polar'}) + fig = plt.figure() + ax = fig.add_subplot(projection='polar') if style_kwargs is None: style_kwargs = {} diff --git a/astroplan/plots/time_dependent.py b/astroplan/plots/time_dependent.py index 8682c27b..aca3296e 100644 --- a/astroplan/plots/time_dependent.py +++ b/astroplan/plots/time_dependent.py @@ -152,8 +152,11 @@ def plot_airmass(targets, observer, time, ax=None, style_kwargs=None, if style_kwargs is None: style_kwargs = {} style_kwargs = dict(style_kwargs) - style_kwargs.setdefault('linewidth', 1.5) - style_kwargs.setdefault('fmt', '-') + + if 'lw' not in style_kwargs: + style_kwargs.setdefault('linewidth', 1.5) + if 'ls' not in style_kwargs and 'linestyle' not in style_kwargs: + style_kwargs.setdefault('fmt', '-') if hasattr(time, 'utcoffset') and use_local_tz: tzoffset = time.utcoffset() @@ -366,7 +369,7 @@ def plot_altitude(targets, observer, time, ax=None, style_kwargs=None, if style_kwargs is None: style_kwargs = {} style_kwargs = dict(style_kwargs) - if 'ls' not in style_kwargs: + if 'ls' not in style_kwargs and 'fmt' not in style_kwargs: style_kwargs.setdefault('linestyle', '-') if 'lw' not in style_kwargs: style_kwargs.setdefault('linewidth', 1.5) @@ -592,8 +595,9 @@ def plot_parallactic(target, observer, time, ax=None, style_kwargs=None, if style_kwargs is None: style_kwargs = {} style_kwargs = dict(style_kwargs) - style_kwargs.setdefault('linestyle', '-') style_kwargs.setdefault('fmt', '-') + if 'ls' not in style_kwargs and 'fmt' not in style_kwargs: + style_kwargs.setdefault('linestyle', '-') # Populate time window if needed. time = Time(time) diff --git a/docs/tutorials/plots.rst b/docs/tutorials/plots.rst index ab9a7667..b7abfb49 100644 --- a/docs/tutorials/plots.rst +++ b/docs/tutorials/plots.rst @@ -678,8 +678,6 @@ Altair, Vega and Deneb. To plot a map of the sky: plot_sky(vega, observer, observe_time, style_kwargs=vega_style) plot_sky(deneb, observer, observe_time, style_kwargs=deneb_style) - - # Note that you don't need this code block to produce the plot. # It reduces the plot size for the documentation. ax = plt.gca()