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
10 changes: 4 additions & 6 deletions ultraplot/axes/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2491,10 +2491,6 @@ def _parse_cycle(
# Ignore cycle for single-column plotting
resolved_cycle = None if ncycle == 1 else resolved_cycle

# Return or apply cycle
if return_cycle:
return resolved_cycle, kwargs

if resolved_cycle and resolved_cycle != self._active_cycle:
self.set_prop_cycle(resolved_cycle)

Expand All @@ -2505,8 +2501,10 @@ def _parse_cycle(
for prop, key in cycle_manually.items():
if kwargs.get(key) is None and prop in current_prop:
value = current_prop[prop]
kwargs[key] = pcolors.to_rgba(value) if key == "c" else value

kwargs[key] = pcolors.to_hex(value) if key == "c" else value
# Return or apply cycle
if return_cycle:
return resolved_cycle, kwargs
return kwargs

def _parse_level_lim(
Expand Down
2 changes: 1 addition & 1 deletion ultraplot/constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,6 @@ class Cycle(cycler.Cycler):
"""

def __init__(self, *args, N=None, samples=None, name=None, **kwargs):
self.name = "_no_name" # default value
cycler_props = self._parse_basic_properties(kwargs)
samples = _not_none(samples=samples, N=N) # trigger Colormap default
if not args:
Expand All @@ -863,6 +862,7 @@ def __init__(self, *args, N=None, samples=None, name=None, **kwargs):
self._handle_colormap_args(args, cycler_props, kwargs, samples, name)

self._iterator = None # internal reference for cycle
self.name = _not_none(name, "_no_name")

def _parse_basic_properties(self, kwargs):
"""Parse and validate basic properties from kwargs."""
Expand Down