Skip to content

Fix lots of warnings in docs/Examples that crash #3224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 12, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Code changes
------------

* A major refactoring of the axes module was made. The axes module has been
split into smaller modules:
split into smaller modules:

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

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

* In :module:`~matplotlib.finance`, almost all functions have been deprecated and
replaced with a pair of functions name `*_ochl` and `*_ohlc`. The former is
'open-close-high-low' order of quotes, and what the module used and the later
is 'open-high-low-close' order of quotes, which is the standard in finance.
* In `~matplotlib.finance`, almost all functions have been deprecated
and replaced with a pair of functions name `*_ochl` and `*_ohlc`.
The former is the 'open-close-high-low' order of quotes used
previously in this module, and the latter is the
'open-high-low-close' order that is standard in finance.

* For consistency the ``face_alpha`` keyword to
:class:`matplotlib.patheffects.SimplePatchShadow` has been deprecated in
Expand Down
4 changes: 2 additions & 2 deletions doc/users/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ specifically the Skew-T used in meteorology.
.. plot:: mpl_examples/api/skewt.py

Support for specifying properties of wedge and text in pie charts.
``````````````````````````````````````````````````````````````
``````````````````````````````````````````````````````````````````
Added the `kwargs` 'wedgeprops' and 'textprops' to :func:`~matplotlib.Axes.pie`
to accept properties for wedge and text objects in a pie. For example, one can
specify wedgeprops = {'linewidth':3} to specify the width of the borders of
Expand Down Expand Up @@ -226,7 +226,7 @@ elements of specialized collections (
Fixed the mouse coordinates giving the wrong theta value in Polar graph
```````````````````````````````````````````````````````````````````````
Added code to
:funct:`~matplotlib.InvertedPolarTransform.transform_non_affine`
:func:`~matplotlib.InvertedPolarTransform.transform_non_affine`
to ensure that the calculated theta value was between the range of 0 and 2 * pi
since the problem was that the value can become negative after applying the
direction and rotation to the theta calculation.
Expand Down
2 changes: 1 addition & 1 deletion examples/color/named_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
ncols = 3
nrows = int(np.ceil(1. * n / ncols))

fig = plt.figure(figsize=(ncols*5, nrows*4))
fig = plt.figure(figsize=(ncols*2.5, nrows*2))
for i, (name, color) in enumerate(sorted_colors):
ax = fig.add_subplot(nrows, ncols, i + 1)
ax.text(0.55, 0.5, name, fontsize=12,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
Displays the difference between interpolation = 'none' and
Displays the difference between interpolation = 'none' and
interpolation = 'nearest'.

Interpolation = 'none' and interpolation = 'nearest' are equivalent when
converting a figure to an image file, such as a PNG.
Interpolation = 'none' and interpolation = 'nearest' behave quite
differently, however, when converting a figure to a vector graphics file,
such as a PDF. As shown, Interpolation = 'none' works well when a big
image is scaled down, while interpolation = 'nearest' works well when a
Interpolation = 'none' and interpolation = 'nearest' are equivalent when
converting a figure to an image file, such as a PNG.
Interpolation = 'none' and interpolation = 'nearest' behave quite
differently, however, when converting a figure to a vector graphics file,
such as a PDF. As shown, Interpolation = 'none' works well when a big
image is scaled down, while interpolation = 'nearest' works well when a
small image is blown up.
"""

Expand Down Expand Up @@ -41,17 +41,17 @@
fig.text(0.383, 0.90, "Interpolation = 'none'", ha = 'center')
fig.text(0.75, 0.90, "Interpolation = 'nearest'", ha = 'center')

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

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