Skip to content

Commit 0c0aa1c

Browse files
authored
more fixes (#224)
1 parent 4985c2e commit 0c0aa1c

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/colormaps.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
# Matplotlib colormaps with erratic color transitions like ``'jet'`` are still
7373
# registered, but they are hidden from this table by default, and their usage is
7474
# discouraged. If you need a list of colors associated with a registered or
75-
# on-the-fly colormap, simply use `~ultraplot.utils.get_colors`.
75+
# on-the-fly colormap, simply use :func:`~ultraplot.utils.get_colors`.
7676
#
7777
# .. note::
7878
#
@@ -81,9 +81,9 @@
8181
# and ``'ViRiDiS'`` are equivalent), diverging colormap names can be specified in
8282
# their "reversed" form (e.g., ``'BuRd'`` is equivalent to ``'RdBu_r'``), and
8383
# appending ``'_r'`` or ``'_s'`` to *any* colormap name will return a
84-
# `~ultraplot.colors.ContinuousColormap.reversed` or
85-
# :property:`~ultraplot.colors.ContinuousColormap.shifted` version of the colormap
86-
# or color cycle. See `~ultraplot.colors.ColormapDatabase` for more info.
84+
# :attr:`~ultraplot.colors.ContinuousColormap.reversed` or
85+
# :attr:`~ultraplot.colors.ContinuousColormap.shifted` version of the colormap
86+
# or color cycle. See :class:`~ultraplot.colors.ColormapDatabase` for more info.
8787

8888
# %%
8989
import ultraplot as uplt
@@ -119,9 +119,9 @@
119119
#
120120
# The colorspace used by a :class:`~ultraplot.colors.PerceptualColormap`
121121
# is set with the `space` keyword arg. To plot arbitrary cross-sections of
122-
# these colorspaces, use `~ultraplot.demos.show_colorspaces` (the black
122+
# these colorspaces, use :func:`~ultraplot.demos.show_colorspaces` (the black
123123
# regions represent impossible colors). To see how colormaps vary with
124-
# respect to each channel, use `~ultraplot.demos.show_channels`. Some examples
124+
# respect to each channel, use :func:`~ultraplot.demos.show_channels`. Some examples
125125
# are shown below.
126126
#
127127
# In theory, "uniform" colormaps should have *straight* lines in hue, chroma,
@@ -168,14 +168,14 @@
168168
#
169169
# * Pass a color name, HEX string, or RGB tuple to :class:`~ultraplot.constructor.Colormap`.
170170
# This builds a monochromatic (single hue) colormap by calling
171-
# `~ultraplot.colors.PerceptualColormap.from_color`. The colormap colors will
171+
# :func:`~ultraplot.colors.PerceptualColormap.from_color`. The colormap colors will
172172
# progress from the specified color to a color with the same hue but changed
173173
# saturation or luminance. These can be set with the `saturation` and `luminance`
174174
# keywords (or their shorthands `s` and `l`). By default, the colormap will
175175
# progress to pure white.
176176
# * Pass a list of color names, HEX strings, or RGB
177177
# tuples to :class:`~ultraplot.constructor.Colormap`. This calls
178-
# `~ultraplot.colors.PerceptualColormap.from_list`, which linearly interpolates
178+
# :func:`~ultraplot.colors.PerceptualColormap.from_list`, which linearly interpolates
179179
# between the hues, saturations, and luminances of the input colors. To facillitate
180180
# the construction of diverging colormaps, the hue channel values for nuetral
181181
# colors (i.e., white, black, and gray) are adjusted to the hues of the preceding
@@ -184,7 +184,7 @@
184184
# * Pass the keywords `hue`, `saturation`, or `luminance` (or their shorthands `h`,
185185
# `s`, and `l`) to :class:`~ultraplot.constructor.Colormap` without any positional arguments
186186
# (or pass a dictionary containing these keys as a positional argument).
187-
# This calls `~ultraplot.colors.PerceptualColormap.from_hsl`, which
187+
# This calls :func:`~ultraplot.colors.PerceptualColormap.from_hsl`, which
188188
# linearly interpolates between the specified channel values. Channel values can be
189189
# specified with numbers between ``0`` and ``100``, color strings, or lists thereof.
190190
# For color strings, the value is *inferred* from the specified color. You can
@@ -256,7 +256,7 @@
256256
#
257257
# To *merge* colormaps, you can pass multiple positional arguments to the
258258
# :class:`~ultraplot.constructor.Colormap` constructor function. This calls the
259-
# `~ultraplot.colors.ContinuousColormap.append` method. Each positional
259+
# :func:`~ultraplot.colors.ContinuousColormap.append` method. Each positional
260260
# argument can be a colormap name, a colormap instance, or a
261261
# :ref:`special argument <ug_cmaps_new>` that generates a new colormap
262262
# on-the-fly. This lets you create new diverging colormaps and segmented
@@ -322,27 +322,27 @@
322322
#
323323
# * To remove colors from the left or right ends of a colormap, pass `left`
324324
# or `right` to :class:`~ultraplot.constructor.Colormap`. This calls the
325-
# :method:`~ultraplot.colors.ContinuousColormap.truncate` method, and can be
325+
# :func:`~ultraplot.colors.ContinuousColormap.truncate` method, and can be
326326
# useful when you want to use colormaps as :ref:`color cycles <ug_cycles>`
327327
# and need to remove the light part so that your lines stand out
328328
# against the background.
329329
# * To modify the central colors of a diverging colormap, pass `cut` to
330330
# :class:`~ultraplot.constructor.Colormap`. This calls the
331-
# `~ultraplot.colors.ContinuousColormap.cut` method, and can be used
331+
# :func:`~ultraplot.colors.ContinuousColormap.cut` method, and can be used
332332
# to create a sharper cutoff between negative and positive values or (when
333333
# `cut` is negative) to expand the "neutral" region of the colormap.
334334
# * To rotate a cyclic colormap, pass `shift` to
335335
# :class:`~ultraplot.constructor.Colormap`. This calls the
336-
# :property:`~ultraplot.colors.ContinuousColormap.shifted` method. UltraPlot ensures
336+
# :func:`~ultraplot.colors.ContinuousColormap.shifted` method. UltraPlot ensures
337337
# the colors at the ends of "shifted" colormaps are *distinct* so that
338338
# levels never blur together.
339339
# * To change the opacity of a colormap or add an opacity *gradation*, pass
340340
# `alpha` to :class:`~ultraplot.constructor.Colormap`. This calls the
341-
# `~ultraplot.colors.ContinuousColormap.set_alpha` method, and can be
341+
# :func:`~ultraplot.colors.ContinuousColormap.set_alpha` method, and can be
342342
# useful when *layering* filled contour or mesh elements.
343343
# * To change the "gamma" of a :class:`~ultraplot.colors.PerceptualColormap`,
344344
# pass `gamma` to :class:`~ultraplot.constructor.Colormap`. This calls the
345-
# `~ultraplot.colors.PerceptualColormap.set_gamma` method, and
345+
# :func:`~ultraplot.colors.PerceptualColormap.set_gamma` method, and
346346
# controls how the luminance and saturation channels vary between colormap
347347
# segments. ``gamma > 1`` emphasizes high luminance, low saturation colors,
348348
# while ``gamma < 1`` emphasizes low luminance, high saturation colors. This
@@ -493,9 +493,9 @@
493493
# To add colormaps downloaded from any of these sources, save the color data file
494494
# to the ``cmaps`` subfolder inside :func:`~ultraplot.config.Configurator.user_folder`,
495495
# or to a folder named ``ultraplot_cmaps`` in the same directory as your python session
496-
# or an arbitrary parent directory (see `~ultraplot.config.Configurator.local_folders`).
496+
# or an arbitrary parent directory (see :func:`~ultraplot.config.Configurator.local_folders`).
497497
# After adding the file, call :func:`~ultraplot.config.register_cmaps` or restart your python
498-
# session. You can also use `~ultraplot.colors.ContinuousColormap.from_file` or manually
498+
# session. You can also use :func:`~ultraplot.colors.ContinuousColormap.from_file` or manually
499499
# pass :class:`~ultraplot.colors.ContinuousColormap` instances or file paths to
500500
# :func:`~ultraplot.config.register_cmaps`. See :func:`~ultraplot.config.register_cmaps`
501501
# for a table of recognized file extensions.

0 commit comments

Comments
 (0)