8000 Fix lots of warnings in docs. · matplotlib/matplotlib@2da0657 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2da0657

Browse files
committed
Fix lots of warnings in docs.
Fix some examples that crash.
1 parent 2d43258 commit 2da0657

File tree

8 files changed

+352
-231
lines changed

8 files changed

+352
-231
lines changed

doc/api/api_changes.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Code changes
1818
------------
1919

2020
* A major refactoring of the axes module was made. The axes module has been
21-
split into smaller modules:
21+
split into smaller modules:
2222

2323
- the `_base` module, which contains a new private _AxesBase class. This
2424
class contains all methods except plotting and labelling methods.
@@ -53,7 +53,7 @@ original location:
5353
* As part of the refactoring to enable Qt5 support, the module
5454
`matplotlib.backends.qt4_compat` was renamed to
5555
`matplotlib.qt_compat`. `qt4_compat` is deprecated in 1.4 and
56-
will be removed in 1.5.
56+
will be removed in 1.5.
5757

5858
* The :func:`~matplotlib.pyplot.errorbar` method has been changed such that
5959
the upper and lower limits (*lolims*, *uplims*, *xlolims*, *xuplims*) now
@@ -76,10 +76,11 @@ original location:
7676
point to `IPython.sphinxext.ipython_directive` instead of
7777
`matplotlib.sphinxext.ipython_directive`.
7878

79-
* In :module:`~matplotlib.finance`, almost all functions have been deprecated and
80-
replaced with a pair of functions name `*_ochl` and `*_ohlc`. The former is
81-
'open-close-high-low' order of quotes, and what the module used and the later
82-
is 'open-high-low-close' order of quotes, which is the standard in finance.
79+
* In `~matplotlib.finance`, almost all functions have been deprecated
80+
and replaced with a pair of functions name `*_ochl` and `*_ohlc`.
81+
The former is 'open-close-high-low' order of quotes, and what the
82+
module used and the later is 'open-high-low-close' order of quotes,
83+
which is the standard in finance.
8384

8485
* For consistency the ``face_alpha`` keyword to
8586
:class:`matplotlib.patheffects.SimplePatchShadow` has been deprecated in

doc/users/whats_new.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ specifically the Skew-T used in meteorology.
160160
.. plot:: mpl_examples/api/skewt.py
161161

162162
Support for specifying properties of wedge and text in pie charts.
163-
``````````````````````````````````````````````````````````````
163+
``````````````````````````````````````````````````````````````````
164164
Added the `kwargs` 'wedgeprops' and 'textprops' to :func:`~matplotlib.Axes.pie`
165165
to accept properties for wedge and text objects in a pie. For example, one can
166166
specify wedgeprops = {'linewidth':3} to specify the width of the borders of
@@ -226,7 +226,7 @@ elements of specialized collections (
226226
Fixed the mouse coordinates giving the wrong theta value in Polar graph
227227
```````````````````````````````````````````````````````````````````````
228228
Added code to
229-
:funct:`~matplotlib.InvertedPolarTransform.transform_non_affine`
229+
:func:`~matplotlib.InvertedPolarTransform.transform_non_affine`
230230
to ensure that the calculated theta value was between the range of 0 and 2 * pi
231231
since the problem was that the value can become negative after applying the
232232
direction and rotation to the theta calculation.

examples/color/named_colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
ncols = 3
4242
nrows = int(np.ceil(1. * n / ncols))
4343

44-
fig = plt.figure(figsize=(ncols*5, nrows*4))
44+
fig = plt.figure(figsize=(ncols*2.5, nrows*2))
4545
for i, (name, color) in enumerate(sorted_colors):
4646
ax = fig.add_subplot(nrows, ncols, i + 1)
4747
ax.text(0.55, 0.5, name, fontsize=12,

examples/images_contours_and_fields/interpolation_none_vs_nearest.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
2-
Displays the difference between interpolation = 'none' and
2+
Displays the difference between interpolation = 'none' and
33
interpolation = 'nearest'.
44
5-
Interpolation = 'none' and interpolation = 'nearest' are equivalent when
6-
converting a figure to an image file, such as a PNG.
7-
Interpolation = 'none' and interpolation = 'nearest' behave quite
8-
differently, however, when converting a figure to a vector graphics file,
9-
such as a PDF. As shown, Interpolation = 'none' works well when a big
10-
image is scaled down, while interpolation = 'nearest' works well when a
5+
Interpolation = 'none' and interpolation = 'nearest' are equivalent when
6+
converting a figure to an image file, such as a PNG.
7+
Interpolation = 'none' and interpolation = 'nearest' behave quite
8+
differently, however, when converting a figure to a vector graphics file,
9+
such as a PDF. As shown, Interpolation = 'none' works well when a big
10+
image is scaled down, while interpolation = 'nearest' works well when a
1111
small image is blown up.
1212
"""
1313

@@ -41,17 +41,17 @@
4141
fig.text(0.383, 0.90, "Interpolation = 'none'", ha = 'center')
4242
fig.text(0.75, 0.90, "Interpolation = 'nearest'", ha = 'center')
4343

44-
#If you were going to run this example on your local machine, you
45-
#would save the figure as a PNG, save the same figure as a PDF, and
44+
#If you were going to run this example on your local machine, you
45+
#would save the figure as a PNG, save the same figure as a PDF, and
4646
#then compare them. The following code would suffice.
47-
txt = fig1.text(0.452, 0.95, 'Saved as a PNG', fontsize = 18)
47+
txt = fig.text(0.452, 0.95, 'Saved as a PNG', fontsize = 18)
4848
# plt.savefig('None_vs_nearest-png.png')
4949
# txt.set_text('Saved as a PDF')
5050
# plt.savefig('None_vs_nearest-pdf.pdf')
5151

5252
#Here, however, we need to display the PDF on a webpage, which means
53-
#the PDF must be converted into an image. For the purposes of this
54-
#example, the 'Nearest_vs_none-pdf.pdf' has been pre-converted into
53+
#the PDF must be converted into an image. For the purposes of this
54+
#example, the 'Nearest_vs_none-pdf.pdf' has been pre-converted into
5555
#'Nearest_vs_none-pdf.png' at 80 dpi. We simply need to load and
5656
#display it.
5757
pdf_im_path = cbook.get_sample_data('None_vs_nearest-pdf.png')

0 commit comments

Comments
 (0)
0