Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions ultraplot/axes/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,9 @@
nsteps : int, default: :rc:`grid.nsteps`
*For cartopy axes only.*
The number of interpolation steps used to draw gridlines.
lonlines, latlines : optional
Aliases for `lonlocator`, `latlocator`.
lonlocator, latlocator : locator-spec, optional
Used to determine the longitude and latitude gridline locations.
Aliases: ``lonlines`` and ``latlines``, respectively.
Passed to the `~ultraplot.constructor.Locator` constructor. Can be
string, float, list of float, or `matplotlib.ticker.Locator` instance.
Expand All @@ -134,16 +133,15 @@
For cartopy >= 0.18, the defaults are ``'dmslon'`` and ``'dmslat'``,
which uses the same locators with ``dms=True``. This selects gridlines
at nice degree-minute-second intervals when the map extent is very small.
lonlines_kw, latlines_kw : optional
Aliases for `lonlocator_kw`, `latlocator_kw`.
lonlocator_kw, latlocator_kw : dict-like, optional
Keyword arguments passed to the `matplotlib.ticker.Locator` class.
lonminorlocator, latminorlocator, lonminorlines, latminorlines : optional
Aliases: ``lonlines_kw`` and ``latlines_kw``, respectively.
lonminorlocator, latminorlocator : optional
As with `lonlocator` and `latlocator` but for the "minor" gridlines.
lonminorlines_kw, latminorlines_kw : optional
Aliases for `lonminorlocator_kw`, `latminorlocator_kw`.
Aliases: ``lonminorlines`` and ``latminorlines``, respectively.
lonminorlocator_kw, latminorlocator_kw : optional
As with `lonlocator_kw`, and `latlocator_kw` but for the "minor" gridlines.
Aliases: ``lonminorlines_kw`` and ``latminorlines_kw``, respectively.
lonlabels, latlabels, labels : str, bool, or sequence, :rc:`grid.labels`
Whether to add non-inline longitude and latitude gridline labels, and on
which sides of the map. Use the keyword `labels` to set both at once. The
Expand Down
26 changes: 13 additions & 13 deletions ultraplot/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from . import legend as plegend
from .config import rc, rc_matplotlib
from .internals import (
_alias_kwargs,
_not_none,
_pop_params,
_pop_rc,
Expand Down Expand Up @@ -724,21 +725,23 @@ def __repr__(self):
@warnings._rename_kwargs(
"0.7.0", axpad="innerpad", autoformat="uplt.rc.autoformat = {}"
)
@_alias_kwargs(
refnum=("ref",),
refaspect=("aspect",),
refwidth=("axwidth",),
refheight=("axheight",),
figwidth=("width",),
figheight=("height",),
)
def __init__(
self,
*,
refnum=None,
ref=None,
refaspect=None,
aspect=None,
refwidth=None,
refheight=None,
axwidth=None,
axheight=None,
figwidth=None,
figheight=None,
width=None,
height=None,
journal=None,
sharex=None,
sharey=None,
Expand Down Expand Up @@ -789,13 +792,10 @@ def __init__(
ultraplot.ui.subplots
matplotlib.figure.Figure
"""
# Resolve aliases
refnum = _not_none(refnum=refnum, ref=ref, default=1)
refaspect = _not_none(refaspect=refaspect, aspect=aspect)
refwidth = _not_none(refwidth=refwidth, axwidth=axwidth)
refheight = _not_none(refheight=refheight, axheight=axheight)
figwidth = _not_none(figwidth=figwidth, width=width)
figheight = _not_none(figheight=figheight, height=height)
# NOTE: Keyword aliases (ref, aspect, axwidth, axheight, width, height) are
# folded into their canonical names by the @_alias_kwargs decorator. Only
# refnum keeps an explicit default, so an omitted or None value maps to 1.
refnum = _not_none(refnum, default=1)

# Initialize sections
figwidth, figheight = self._init_figure_size(
Expand Down
Loading