Skip to content

Commit faf3813

Browse files
committed
Improve docs of level list internal methods
1 parent ef0446f commit faf3813

File tree

1 file changed

+29
-21
lines changed

1 file changed

+29
-21
lines changed

proplot/axes/plot.py

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,10 +2083,11 @@ def _parse_color(self, x, y, c, *, apply_cycle=True, infer_rgb=False, **kwargs):
20832083
@warnings._rename_kwargs('0.6', centers='values')
20842084
def _parse_cmap(
20852085
self, *args,
2086-
cmap=None, cmap_kw=None, c=None, color=None, colors=None, default_cmap=None,
2087-
norm=None, norm_kw=None, extend=None, vmin=None, vmax=None,
2088-
discrete=None, default_discrete=True, skip_autolev=False,
2089-
plot_lines=False, plot_contours=False, min_levels=None, **kwargs
2086+
cmap=None, cmap_kw=None, c=None, color=None, colors=None,
2087+
norm=None, norm_kw=None, extend=None, vmin=None, vmax=None, discrete=None,
2088+
default_cmap=None, default_discrete=True, skip_autolev=False,
2089+
min_levels=None, plot_lines=False, plot_contours=False,
2090+
**kwargs
20902091
):
20912092
"""
20922093
Parse colormap and normalizer arguments.
@@ -2103,14 +2104,20 @@ def _parse_cmap(
21032104
The colormap extend setting.
21042105
vmin, vmax : flaot, optional
21052106
The normalization range.
2106-
plot_lines : bool, optional
2107-
Whether these are lines. If so the default monorhcomarit luminance is 90.
2108-
plot_contours : bool, optional
2109-
Whether these are contours. If so then discrete is required.
2110-
min_levels : int, optional
2111-
The minimum number of valid levels. 1 for line contour plots 2 otherwise.
21122107
sequential, diverging, cyclic, qualitative : bool, optional
21132108
Toggle various colormap types.
2109+
discrete : bool, optional
2110+
Whether to apply `DiscreteNorm` to the colormap.
2111+
default_discrete : bool, optional
2112+
The default `discrete`. Depends on plotting method.
2113+
skip_autolev : bool, optional
2114+
Whether to skip automatic level generation.
2115+
min_levels : int, optional
2116+
The minimum number of valid levels. 1 for line contour plots 2 otherwise.
2117+
plot_lines : bool, optional
2118+
Whether these are lines. If so the default monochromatic luminance is 90.
2119+
plot_contours : bool, optional
2120+
Whether these are contours. If so then a discrete of `True` is required.
21142121
"""
21152122
# Parse keyword args
21162123
cmap_kw = cmap_kw or {}
@@ -2305,9 +2312,8 @@ def _parse_cycle(
23052312
return kwargs
23062313

23072314
def _parse_level_count(
2308-
self, *args, levels=None,
2309-
extend=None, norm=None, norm_kw=None, vmin=None, vmax=None,
2310-
locator=None, locator_kw=None, symmetric=None, **kwargs
2315+
self, *args, levels=None, locator=None, locator_kw=None, vmin=None, vmax=None,
2316+
norm=None, norm_kw=None, extend=None, symmetric=None, **kwargs
23112317
):
23122318
"""
23132319
Return a suitable level list given the input data, normalizer,
@@ -2319,16 +2325,16 @@ def _parse_level_count(
23192325
The sample data. Passed to `_parse_level_lim`.
23202326
levels : int
23212327
The approximate number of levels.
2328+
locator, locator_kw
2329+
The tick locator used to draw levels.
23222330
vmin, vmax : float, optional
2323-
The approximate minimum and maximum level edges. Passed to the locator.
2324-
diverging : bool, optional
2325-
Whether the resulting levels are intended for a diverging normalizer.
2331+
The minimum and maximum values passed to the tick locator.
2332+
norm, norm_kw : optional
2333+
The continuous normalizer. Affects the default locator used to draw levels.
2334+
extend : str, optional
2335+
The extend setting. Affects level trimming settings.
23262336
symmetric : bool, optional
23272337
Whether the resulting levels should be symmetric about zero.
2328-
norm, norm_kw : optional
2329-
Passed to `~proplot.constructor.Norm`. Used to change the default
2330-
`locator` (e.g., a `~matplotlib.colors.LogNorm` normalizer will use
2331-
a `~matplotlib.ticker.LogLocator` to generate levels).
23322338
23332339
Parameters
23342340
----------
@@ -2439,7 +2445,7 @@ def _parse_level_list(
24392445
norm, norm_kw : optional
24402446
Passed to `Norm`. Used to possbily infer levels or to convert values.
24412447
skip_autolev : bool, optional
2442-
Whether to skip autolev parsing.
2448+
Whether to skip automatic level generation.
24432449
min_levels : int, optional
24442450
The minimum number of levels allowed.
24452451
@@ -2582,6 +2588,8 @@ def _parse_level_lim(
25822588
Whether to limit the default range to exclude outliers.
25832589
inbounds : bool, optional
25842590
Whether to filter to in-bounds data.
2591+
negative, positive, symmetric : bool, optional
2592+
Whether limits should be negative, positive, or symmetric.
25852593
to_centers : bool, optional
25862594
Whether to convert coordinates to 'centers'.
25872595

0 commit comments

Comments
 (0)