Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b02ffa6

Browse files
committed
Remove unnecessary :func:, :meth: from examples markup.
1 parent bda5d20 commit b02ffa6

19 files changed

Lines changed: 51 additions & 57 deletions

examples/color/custom_cmap.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
For more detail on creating and manipulating colormaps see
77
:doc:`/tutorials/colors/colormap-manipulation`.
88
9-
Creating a :doc:`colormap </tutorials/colors/colormaps>`
10-
from a list of colors can be done with the
11-
:meth:`~.colors.LinearSegmentedColormap.from_list` method of
12-
`.LinearSegmentedColormap`. You must pass a list of RGB tuples that define the
13-
mixture of colors from 0 to 1.
9+
Creating a :doc:`colormap </tutorials/colors/colormaps>` from a list of colors
10+
can be done with the `.LinearSegmentedColormap.from_list` method. You must
11+
pass a list of RGB tuples that define the mixture of colors from 0 to 1.
1412
1513
1614
Creating custom colormaps

examples/images_contours_and_fields/contourf_demo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
Contourf Demo
44
=============
55
6-
How to use the :meth:`.axes.Axes.contourf` method to create filled contour plots.
6+
How to use the `.axes.Axes.contourf` method to create filled contour plots.
77
"""
8+
89
import numpy as np
910
import matplotlib.pyplot as plt
1011

examples/images_contours_and_fields/image_annotated_heatmap.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
variables as a color coded image plot. This is often referred to as a
88
heatmap. If the data is categorical, this would be called a categorical
99
heatmap.
10-
Matplotlib's :meth:`imshow <matplotlib.axes.Axes.imshow>` function makes
10+
11+
Matplotlib's `~matplotlib.axes.Axes.imshow` function makes
1112
production of such plots particularly easy.
1213
1314
The following examples show how to create a heatmap with annotations.
@@ -25,11 +26,11 @@
2526
# which defines the data to color code. We then also need two lists or arrays
2627
# of categories; of course the number of elements in those lists
2728
# need to match the data along the respective axes.
28-
# The heatmap itself is an :meth:`imshow <matplotlib.axes.Axes.imshow>` plot
29+
# The heatmap itself is an `~matplotlib.axes.Axes.imshow` plot
2930
# with the labels set to the categories we have.
3031
# Note that it is important to set both, the tick locations
31-
# (:meth:`set_xticks<matplotlib.axes.Axes.set_xticks>`) as well as the
32-
# tick labels (:meth:`set_xticklabels<matplotlib.axes.Axes.set_xticklabels>`),
32+
# (`~matplotlib.axes.Axes.set_xticks`) as well as the
33+
# tick labels (`~matplotlib.axes.Axes.set_xticklabels`),
3334
# otherwise they would become out of sync. The locations are just
3435
# the ascending integer numbers, while the ticklabels are the labels to show.
3536
# Finally we can label the data itself by creating a `~matplotlib.text.Text`

examples/images_contours_and_fields/image_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Many ways to plot images in Matplotlib.
77
88
The most common way to plot images in Matplotlib is with
9-
:meth:`~.axes.Axes.imshow`. The following examples demonstrate much of the
9+
`~.axes.Axes.imshow`. The following examples demonstrate much of the
1010
functionality of imshow and the many images you can create.
1111
"""
1212

examples/images_contours_and_fields/image_transparency_blend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Blend transparency with color to highlight parts of data with imshow.
77
8-
A common use for :func:`matplotlib.pyplot.imshow` is to plot a 2-D statistical
8+
A common use for `matplotlib.pyplot.imshow` is to plot a 2-D statistical
99
map. The function makes it easy to visualize a 2-D matrix as an image and add
1010
transparency to the output. For example, one can plot a statistic (such as a
1111
t-statistic) and color the transparency of each pixel according to its p-value.
@@ -67,7 +67,7 @@ def normal_pdf(x, mean, var):
6767
# ========================
6868
#
6969
# The simplest way to include transparency when plotting data with
70-
# :func:`matplotlib.pyplot.imshow` is to pass an array matching the shape of
70+
# `matplotlib.pyplot.imshow` is to pass an array matching the shape of
7171
# the data to the ``alpha`` argument. For example, we'll create a gradient
7272
# moving from left to right below.
7373

examples/images_contours_and_fields/interpolation_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
=========================
55
66
This example displays the difference between interpolation methods for
7-
:meth:`~.axes.Axes.imshow`.
7+
`~.axes.Axes.imshow`.
88
99
If *interpolation* is None, it defaults to the :rc:`image.interpolation`.
1010
If the interpolation is ``'none'``, then no interpolation is performed for the

examples/images_contours_and_fields/pcolor_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Pcolor Demo
44
===========
55
6-
Generating images with :meth:`~.axes.Axes.pcolor`.
6+
Generating images with `~.axes.Axes.pcolor`.
77
88
Pcolor allows you to generate 2-D image-style plots. Below we will show how
99
to do so in Matplotlib.
@@ -33,9 +33,9 @@
3333
# Comparing pcolor with similar functions
3434
# ---------------------------------------
3535
#
36-
# Demonstrates similarities between :meth:`~.axes.Axes.pcolor`,
37-
# :meth:`~.axes.Axes.pcolormesh`, :meth:`~.axes.Axes.imshow` and
38-
# :meth:`~.axes.Axes.pcolorfast` for drawing quadrilateral grids.
36+
# Demonstrates similarities between `~.axes.Axes.pcolor`,
37+
# `~.axes.Axes.pcolormesh`, `~.axes.Axes.imshow` and
38+
# `~.axes.Axes.pcolorfast` for drawing quadrilateral grids.
3939

4040
# make these smaller to increase the resolution
4141
dx, dy = 0.15, 0.05

examples/images_contours_and_fields/pcolormesh_levels.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
pcolormesh
44
==========
55
6-
Shows how to combine Normalization and Colormap instances to draw
7-
"levels" in :meth:`~.axes.Axes.pcolor`, :meth:`~.axes.Axes.pcolormesh`
8-
and :meth:`~.axes.Axes.imshow` type plots in a similar
9-
way to the levels keyword argument to contour/contourf.
10-
6+
Shows how to combine Normalization and Colormap instances to draw "levels" in
7+
`~.axes.Axes.pcolor`, `~.axes.Axes.pcolormesh` and `~.axes.Axes.imshow` type
8+
plots in a similar way to the levels keyword argument to contour/contourf.
119
"""
1210

1311
import matplotlib

examples/images_contours_and_fields/plot_streamplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
==========
55
66
A stream plot, or streamline plot, is used to display 2D vector fields. This
7-
example shows a few features of the :meth:`~.axes.Axes.streamplot` function:
7+
example shows a few features of the `~.axes.Axes.streamplot` function:
88
99
* Varying the color along a streamline.
1010
* Varying the density of streamlines.

examples/lines_bars_and_markers/scatter_with_legend.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@
3737
# -------------------------
3838
#
3939
# Another option for creating a legend for a scatter is to use the
40-
# `~matplotlib.collections.PathCollection`'s
41-
# :meth:`~.PathCollection.legend_elements` method.
42-
# It will automatically try to determine a useful number of legend entries
43-
# to be shown and return a tuple of handles and labels. Those can be passed
44-
# to the call to :meth:`~.axes.Axes.legend`.
40+
# `.PathCollection.legend_elements` method. It will automatically try to
41+
# determine a useful number of legend entries to be shown and return a tuple of
42+
# handles and labels. Those can be passed to the call to `~.axes.Axes.legend`.
4543

4644

4745
N = 45
@@ -66,10 +64,9 @@
6664

6765

6866
##############################################################################
69-
# Further arguments to the :meth:`~.PathCollection.legend_elements` method
67+
# Further arguments to the `.PathCollection.legend_elements` method
7068
# can be used to steer how many legend entries are to be created and how they
7169
# should be labeled. The following shows how to use some of them.
72-
#
7370

7471
volume = np.random.rayleigh(27, size=40)
7572
amount = np.random.poisson(10, size=40)

0 commit comments

Comments
 (0)