Skip to content

Commit

Permalink
docs tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Jul 27, 2023
1 parent ea331e2 commit 9c7678a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
----------------
Expand Down
6 changes: 2 additions & 4 deletions astroplan/plots/sky.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 = {}
Expand Down
12 changes: 8 additions & 4 deletions astroplan/plots/time_dependent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions docs/tutorials/plots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9c7678a

Please sign in to comment.