Пример #1
0
# them to your plots.

# %% [raw] raw_mimetype="text/restructuredtext"
# .. _ug_cycles_included:
#
# Included color cycles
# ---------------------
#
# Use `~proplot.demos.show_cycles` to generate a table of the color cycles
# registered by default and loaded from your ``~/.proplot/cycles`` folder.
# You can make new color cycles and add them to this folder using the
# `~proplot.constructor.Cycle` :ref:`constructor function <why_constructor>`.

# %%
import proplot as plot
fig, axs = plot.show_cycles()

# %% [raw] raw_mimetype="text/restructuredtext"
# .. _ug_cycles_changing:
#
# Changing the color cycle
# ------------------------
#
# Various plotting commands like `~matplotlib.axes.Axes.plot` and
# `~matplotlib.axes.Axes.scatter` now accept a `cycle` keyword arg, which is
# passed to the `~proplot.constructor.Cycle` constructor function (see
# `~proplot.axes.cycle_changer`). To save your color cycle data and use
# it every time ProPlot is imported, simply pass ``save=True`` to
# `~proplot.constructor.Cycle`. If you want to change the global property
# cycler, pass a *name* to the :rcraw:`cycle` setting or pass the result of
# `~proplot.constructor.Cycle` to the :rcraw:`axes.prop_cycle` setting (see
Пример #2
0
# .. _ug_cycles_included:
#
# Included color cycles
# ---------------------
#
# Use `~proplot.demos.show_cycles` to generate a table of registered color
# cycles. The table includes the default color cycles registered by proplot and
# "user" color cycles created with the `~proplot.constructor.Cycle` constructor
# function or loaded from `~proplot.config.Configurator.user_folder`. If you need
# the list of colors associated with a registered or on-the-fly color cycle,
# simply use `~proplot.utils.get_colors`.

# %%
import proplot as pplt

fig, axs = pplt.show_cycles(rasterized=True)

# %% [raw] raw_mimetype="text/restructuredtext"
# .. _ug_cycles_changing:
#
# Changing the color cycle
# ------------------------
#
# Most 1D `~proplot.axes.PlotAxes` commands like `~proplot.axes.PlotAxes.line`
# and `~proplot.axes.PlotAxes.scatter` accept a `cycle` keyword (see the
# :ref:`1D plotting section <ug_apply_cycle>`). This can be used to change the
# color cycle on-the-fly, whether plotting with successive calls to
# `~proplot.axes.PlotAxes` commands or a single call using 2D array(s) (see
# the :ref:`1D plotting section <ug_1dstd>`). To change the global property
# cycler, pass a `~proplot.colors.DiscreteColormap` or cycle name
# to :rcraw:`cycle` or pass the result of `~proplot.constructor.Cycle`