|
35 | 35 |
|
36 | 36 | ############################################################################### |
37 | 37 | # So ``yy[:, i]`` will give you the ``i``-th offset sine curve. Let's set the |
38 | | -# default prop_cycle using :func:`matplotlib.pyplot.rc`. We'll combine a color |
39 | | -# cycler and a linestyle cycler by adding (``+``) two ``cycler``'s together. |
40 | | -# See the bottom of this tutorial for more information about combining |
41 | | -# different cyclers. |
| 38 | +# default ``prop_cycle`` using :func:`matplotlib.pyplot.rc`. We'll combine a |
| 39 | +# color cycler and a linestyle cycler by adding (``+``) two ``cycler``'s |
| 40 | +# together. See the bottom of this tutorial for more information about |
| 41 | +# combining different cyclers. |
42 | 42 | default_cycler = (cycler(color=['r', 'g', 'b', 'y']) + |
43 | 43 | cycler(linestyle=['-', '--', ':', '-.'])) |
44 | 44 |
|
|
48 | 48 | ############################################################################### |
49 | 49 | # Now we'll generate a figure with two axes, one on top of the other. On the |
50 | 50 | # first axis, we'll plot with the default cycler. On the second axis, we'll |
51 | | -# set the prop_cycler using :func:`matplotlib.axes.Axes.set_prop_cycle` |
| 51 | +# set the ``prop_cycle`` using :func:`matplotlib.axes.Axes.set_prop_cycle`, |
52 | 52 | # which will only set the ``prop_cycle`` for this :mod:`matplotlib.axes.Axes` |
53 | 53 | # instance. We'll use a second ``cycler`` that combines a color cycler and a |
54 | 54 | # linewidth cycler. |
|
67 | 67 | plt.show() |
68 | 68 |
|
69 | 69 | ############################################################################### |
70 | | -# Setting ``prop_cycler`` in the ``matplotlibrc`` file or style files |
71 | | -# ------------------------------------------------------------------- |
| 70 | +# Setting ``prop_cycle`` in the ``matplotlibrc`` file or style files |
| 71 | +# ------------------------------------------------------------------ |
72 | 72 | # |
73 | | -# Remember, if you want to set a custom ``prop_cycler`` in your |
| 73 | +# Remember, if you want to set a custom cycler in your |
74 | 74 | # ``.matplotlibrc`` file or a style file (``style.mplstyle``), you can set the |
75 | 75 | # ``axes.prop_cycle`` property: |
76 | 76 | # |
77 | 77 | # .. code-block:: python |
78 | 78 | # |
79 | | -# axes.prop_cycle : cycler(color='bgrcmyk') |
| 79 | +# axes.prop_cycle : cycler(color='bgrcmyk') |
80 | 80 | # |
81 | 81 | # Cycling through multiple properties |
82 | 82 | # ----------------------------------- |
|
0 commit comments