Skip to content

Commit f33edfe

Browse files
committed
Cleanup internals and remove premature note box
1 parent 9bded5a commit f33edfe

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

docs/api.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ is deprecated (see :ref:`What's New <whats_new>`). However, proplot adheres to
1414
deprecated functionality will still work and issue warnings rather than errors
1515
until the first major release (version 1.0.0).
1616

17-
.. important::
18-
19-
The color transformation functions like `to_rgba` and `scale_luminance` from
20-
proplot < 0.10.0 can now be found as methods on the new `~proplot.colors.Color`
21-
class. Note that old code that uses commands like ``pplt.to_rgba()`` and
22-
``pplt.scale_luminance()`` will still work (but result in a deprecation warning).
23-
2417
.. important::
2518

2619
The documentation for "wrapper" functions like `standardize_1d` and `cmap_changer`

proplot/axes/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2724,8 +2724,8 @@ def set_prop_cycle(self, *args, **kwargs):
27242724
# Includes both proplot syntax with positional arguments interpreted as
27252725
# color arguments and oldschool matplotlib cycler(key, value) syntax.
27262726
if len(args) == 2 and isinstance(args[0], str) and np.iterable(args[1]):
2727-
if _pop_props({args[0]: object()}, 'line'):
2728-
kwargs = {args[0]: args[1]}
2727+
if _pop_props({args[0]: object()}, 'line'): # if a valid line property
2728+
kwargs = {args[0]: args[1]} # pass as keyword argument
27292729
args = ()
27302730
cycle = self._active_cycle = constructor.Cycle(*args, **kwargs)
27312731
return super().set_prop_cycle(cycle) # set the property cycler after validation

proplot/axes/plot.py

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,11 +2273,26 @@ def _parse_cmap(
22732273
return kwargs
22742274

22752275
def _parse_cycle(
2276-
self, ncycle=None, *,
2277-
cycle=None, cycle_kw=None, cycle_manually=None, return_cycle=False, **kwargs
2276+
self, ncycle=None, *, cycle=None, cycle_kw=None,
2277+
cycle_manually=None, return_cycle=False, **kwargs
22782278
):
22792279
"""
22802280
Parse property cycle-related arguments.
2281+
2282+
Parameters
2283+
----------
2284+
ncycle : int, optional
2285+
The number of samples to draw for the cycle.
2286+
cycle : cycle-spec, optional
2287+
The property cycle specifier.
2288+
cycle_kw : dict-like, optional
2289+
The property cycle keyword arguments
2290+
cycle_manually : dict-like, optional
2291+
Mapping of property cycle keys to plotting function keys. Used
2292+
to translate property cycle line properties to scatter properties.
2293+
return_cycle : bool, optional
2294+
Whether to simply return the property cycle or apply it. The cycle is
2295+
only applied (and therefore reset) if it differs from the current one.
22812296
"""
22822297
# Create the property cycler and update it if necessary
22832298
# NOTE: Matplotlib Cycler() objects have built-in __eq__ operator
@@ -2348,11 +2363,11 @@ def _parse_level_count(
23482363
symmetric : bool, optional
23492364
Whether the resulting levels should be symmetric about zero.
23502365
2351-
Parameters
2352-
----------
2366+
Returns
2367+
-------
23532368
levels : list of float
23542369
The level edges.
2355-
kwargs
2370+
**kwargs
23562371
Unused arguments.
23572372
"""
23582373
# Input args
@@ -2467,7 +2482,7 @@ def _parse_level_list(
24672482
-------
24682483
levels : list of float
24692484
The level edges.
2470-
kwargs
2485+
**kwargs
24712486
Unused arguments.
24722487
"""
24732488
# Helper function that restricts levels
@@ -2621,7 +2636,7 @@ def _parse_level_lim(
26212636
-------
26222637
vmin, vmax : float
26232638
The minimum and maximum.
2624-
kwargs
2639+
**kwargs
26252640
Unused arguemnts.
26262641
"""
26272642
# Parse vmin and vmax

0 commit comments

Comments
 (0)