You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate and merge `~cycler.Cycler` instances in a variety of ways. The new generated class can be used to internally map keywords to the properties of the `~cycler.Cycler` instance. It is used by various plot functions to cycle through colors, linestyles, markers, etc.
779
+
780
+
Parameters
781
+
----------
782
+
*args : colormap-spec or cycle-spec, optional
783
+
Positional arguments control the *colors* in the `~cycler.Cycler`
784
+
object. If zero arguments are passed, the single color ``'black'``
785
+
is used. If more than one argument is passed, the resulting cycles
786
+
are merged. Arguments are interpreted as follows:
787
+
788
+
* If a `~cycler.Cycler`, nothing more is done.
789
+
* If a sequence of RGB tuples or color strings, these colors are used.
790
+
* If a `~ultraplot.colors.DiscreteColormap`, colors from the ``colors``
791
+
attribute are used.
792
+
* If a string cycle name, that `~ultraplot.colors.DiscreteColormap`
793
+
is looked up and its ``colors`` are used.
794
+
* In all other cases, the argument is passed to `Colormap`, and
795
+
colors from the resulting `~ultraplot.colors.ContinuousColormap`
796
+
are used. See the `samples` argument.
797
+
798
+
If the last positional argument is numeric, it is used for the
799
+
`samples` keyword argument.
800
+
N
801
+
Shorthand for `samples`.
802
+
samples : float or sequence of float, optional
803
+
For `~ultraplot.colors.DiscreteColormap`\\ s, this is the number of
804
+
colors to select. For example, ``Cycle('538', 4)`` returns the first 4
805
+
colors of the ``'538'`` color cycle.
806
+
For `~ultraplot.colors.ContinuousColormap`\\ s, this is either a
807
+
sequence of sample coordinates used to draw colors from the colormap, or
808
+
an integer number of colors to draw. If the latter, the sample coordinates
809
+
are ``np.linspace(0, 1, samples)``. For example, ``Cycle('Reds', 5)``
810
+
divides the ``'Reds'`` colormap into five evenly spaced colors.
811
+
812
+
Other parameters
813
+
----------------
814
+
c, color, colors : sequence of color-spec, optional
815
+
A sequence of colors passed as keyword arguments. This is equivalent
816
+
to passing a sequence of colors as the first positional argument and is
817
+
included for consistency with `~matplotlib.axes.Axes.set_prop_cycle`.
818
+
If positional arguments were passed, the colors in this list are
819
+
appended to the colors resulting from the positional arguments.
0 commit comments