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

Skip to content

Commit e566ba5

Browse files
committed
Move remaining examples from api/
1 parent ff67864 commit e566ba5

37 files changed

+24
-50
lines changed

doc/api/pyplot_summary.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ While it is easy to quickly generate plots with the
2828
we recommend using the object-oriented approach for more control
2929
and customization of your plots. See the methods in the
3030
:meth:`matplotlib.axes.Axes` class for many of the same plotting functions.
31-
For examples of the OO approach to Matplotlib, see the
32-
:ref:`API Examples<api_examples>`.
3331

3432
Colors in Matplotlib
3533
--------------------

doc/faq/howto_faq.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Finally, the multipage pdf object has to be closed::
137137
pp.close()
138138

139139
The same can be done using the pgf backend::
140-
140+
141141
from matplotlib.backends.backend_pgf import PdfPages
142142

143143

@@ -415,7 +415,8 @@ locators as desired because the two axes are independent.
415415

416416
.. htmlonly::
417417

418-
See :ref:`sphx_glr_gallery_api_two_scales.py` for a complete example
418+
See :ref:`sphx_glr_gallery_subplots_axes_and_figures_two_scales.py`
419+
for a complete example
419420

420421
.. _howto-batch:
421422

@@ -661,7 +662,7 @@ For more on configuring your backend, see
661662

662663
Alternatively, you can avoid pylab/pyplot altogether, which will give
663664
you a little more control, by calling the API directly as shown in
664-
:ref:`sphx_glr_gallery_api_agg_oo_sgskip.py`.
665+
:ref:`sphx_glr_gallery_misc_agg_oo_sgskip.py`.
665666

666667
You can either generate hardcopy on the filesystem by calling savefig::
667668

doc/users/prev_whats_new/whats_new_1.1.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Sankey Diagrams
1717

1818
Kevin Davies has extended Yannick Copin's original Sankey example into a module
1919
(:mod:`~matplotlib.sankey`) and provided new examples
20-
(:ref:`sphx_glr_gallery_api_sankey_basics.py`, :ref:`sphx_glr_gallery_api_sankey_links.py`,
21-
:ref:`sphx_glr_gallery_api_sankey_rankine.py`).
20+
(:ref:`sphx_glr_gallery_specialty_plots_sankey_basics.py`, :ref:`sphx_glr_gallery_specialty_plots_sankey_links.py`,
21+
:ref:`sphx_glr_gallery_specialty_plots_sankey_rankine.py`).
2222

23-
.. figure:: ../../gallery/api/images/sphx_glr_sankey_rankine_001.png
24-
:target: ../../gallery/api/sankey_rankine.html
23+
.. figure:: ../../gallery/specialty_plots/images/sphx_glr_sankey_rankine_001.png
24+
:target: ../../gallery/specialty_plots/sankey_rankine.html
2525
:align: center
2626
:scale: 50
2727

doc/users/prev_whats_new/whats_new_1.4.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ matplotlib internals were cleaned up to support using such transforms in
160160
:class:`~matplotlib.Axes`. This transform is important for some plot types,
161161
specifically the Skew-T used in meteorology.
162162

163-
.. figure:: ../../gallery/api/images/sphx_glr_skewt_001.png
164-
:target: ../../gallery/api/skewt.html
163+
.. figure:: ../../gallery/specialty_plots/images/sphx_glr_skewt_001.png
164+
:target: ../../gallery/specialty_plots/skewt.html
165165
:align: center
166166
:scale: 50
167167

doc/users/prev_whats_new/whats_new_1.5.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ kwargs names is not ideal, but `Axes.fill_between` already has a
377377

378378
This is particularly useful for plotting pre-binned histograms.
379379

380-
.. figure:: ../../gallery/api/images/sphx_glr_filled_step_001.png
381-
:target: ../../gallery/api/filled_step.html
380+
.. figure:: ../../gallery/lines_bars_and_markers/images/sphx_glr_filled_step_001.png
381+
:target: ../../gallery/lines_bars_and_markers/filled_step.html
382382
:align: center
383383
:scale: 50
384384

examples/api/README.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/api/watermark_image.py renamed to examples/images_contours_and_fields/watermark_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Watermark image
44
===============
55
6-
Use a PNG file as a watermark
6+
Using a PNG file as a watermark.
77
"""
88
import numpy as np
99
import matplotlib.cbook as cbook

examples/api/span_regions.py renamed to examples/lines_bars_and_markers/span_regions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
================
55
66
Illustrate some helper functions for shading regions where a logical
7-
mask is True
7+
mask is True.
88
99
See :meth:`matplotlib.collections.BrokenBarHCollection.span_where`
1010
"""

examples/api/agg_oo_sgskip.py renamed to examples/misc/agg_oo_sgskip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The object-oriented interface
44
=============================
55
6-
A pure OO (look Ma, no pyplot!) example using the agg backend.
6+
A pure object-oriented example using the agg backend.
77
"""
88

99
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/api/two_scales.py renamed to examples/subplots_axes_and_figures/two_scales.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
Plots with different scales
44
===========================
55
6-
Demonstrate how to do two plots on the same axes with different left and
7-
right scales.
6+
Two plots on the same axes with different left and right scales.
87
98
The trick is to use *two different axes* that share the same *x* axis.
109
You can use separate `matplotlib.ticker` formatters and locators as

examples/test2.png

1.17 KB
Loading

examples/api/legend.py renamed to examples/text_labels_and_annotations/legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
legend = ax.legend(loc='upper center', shadow=True, fontsize='x-large')
2525

2626
# Put a nicer background color on the legend.
27-
legend.get_frame().set_facecolor('#00FFCC')
27+
legend.get_frame().set_facecolor('C0')
2828

2929
plt.show()

examples/api/watermark_text.py renamed to examples/text_labels_and_annotations/watermark_text.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
Text watermark
44
==============
55
6-
Use a Text as a watermark
6+
Adding a text watermark.
77
"""
88
import numpy as np
9-
#import matplotlib
10-
#matplotlib.use('Agg')
11-
129
import matplotlib.pyplot as plt
1310

1411
# Fixing random state for reproducibility
@@ -19,7 +16,6 @@
1916
ax.plot(np.random.rand(20), '-o', ms=20, lw=2, alpha=0.7, mfc='orange')
2017
ax.grid()
2118

22-
# position bottom right
2319
fig.text(0.95, 0.05, 'Property of MPL',
2420
fontsize=50, color='gray',
2521
ha='right', va='bottom', alpha=0.5)

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def legend(self, *args, **kwargs):
368368
Examples
369369
--------
370370
371-
.. plot:: gallery/api/legend.py
371+
.. plot:: gallery/text_labels_and_annotations/legend.py
372372
373373
"""
374374
handles, labels, extra_args, kwargs = mlegend._parse_legend_args(

lib/matplotlib/path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def make_compound_path_from_polys(cls, XY):
303303
numsides x 2) numpy array of vertices. Return object is a
304304
:class:`Path`
305305
306-
.. plot:: gallery/api/histogram_path.py
306+
.. plot:: gallery/misc/histogram_path.py
307307
308308
"""
309309

lib/matplotlib/sankey.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def __init__(self, ax=None, scale=1.0, unit='', format='%G', gap=0.25,
118118
119119
**Examples:**
120120
121-
.. plot:: gallery/api/sankey_basics.py
121+
.. plot:: gallery/specialty_plots/sankey_basics.py
122122
"""
123123
# Check the arguments.
124124
if gap < 0:

tutorials/introductory/lifecycle.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
"axis", which refers to the x/y axis of a plot).
3838
3939
We call methods that do the plotting directly from the Axes, which gives
40-
us much more flexibility and power in customizing our plot. See the
41-
:ref:`object-oriented examples <api_examples>` for many examples of how
42-
this approach is used.
40+
us much more flexibility and power in customizing our plot.
4341
4442
.. note::
4543

tutorials/introductory/sample_plots.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@
333333
generates figure legends, with MATLAB-compatible legend-placement
334334
functions.
335335
336-
.. figure:: ../../gallery/api/images/sphx_glr_legend_001.png
337-
:target: ../../gallery/api/legend.html
336+
.. figure:: ../../gallery/text_labels_and_annotations/images/sphx_glr_legend_001.png
337+
:target: ../../gallery/text_labels_and_annotations/legend.html
338338
:align: center
339339
:scale: 50
340340

0 commit comments

Comments
 (0)