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

Skip to content

Commit 154cdc5

Browse files
committed
auto converting plot directive
1 parent 622e705 commit 154cdc5

22 files changed

Lines changed: 627 additions & 108 deletions

doc/faq/howto_faq.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,12 @@ behavior by specifying the coordinates of the label. The example
279279
below shows the default behavior in the left subplots, and the manual
280280
setting in the right subplots.
281281

282-
.. plot:: mpl_examples/pyplots/align_ylabels.py
283-
:include-source:
282+
.. figure:: ../gallery/pyplots/images/sphx_glr_align_ylabels_001.png
283+
:target: ../gallery/pyplots/align_ylabels.html
284+
:align: center
285+
:scale: 50
286+
287+
Align Ylabels
284288

285289
.. _date-index-plots:
286290

@@ -754,3 +758,4 @@ reference page <http://dx.doi.org/10.1109/MCSE.2007.55>`_)::
754758
development, interactive scripting, and publication-quality image
755759
generation across user interfaces and operating systems.},
756760
Bdsk-Url-1 = {http://gateway.isiknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcAuth=Alerting&SrcApp=Alerting&DestApp=WOS&DestLinkType=FullRecord;KeyUT=000245668100019}}
761+

doc/mpl_toolkits/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ plotting (scatter, surf, line, mesh) tools. Not the fastest or feature
3030
complete 3D library out there, but ships with Matplotlib and thus may be a
3131
lighter weight solution for some use cases.
3232

33-
.. plot:: gallery/mplot3d/contourf3d_2.py
33+
.. figure:: ../gallery/mplot3d/images/sphx_glr_contourf3d_2_001.png
34+
:target: ../gallery/mplot3d/contourf3d_2.html
35+
:align: center
36+
:scale: 50
37+
38+
Contourf3d 2
3439

3540
.. _toolkit_axes_grid1:
3641

@@ -54,3 +59,4 @@ axisartist
5459

5560
The :ref:`mpl_toolkits.axisartist <toolkit_axisartist-index>` toolkit contains
5661
a custom Axes class that is meant to support for curvilinear grids.
62+

doc/mpl_toolkits/mplot3d/tutorial.rst

Lines changed: 110 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,41 +36,68 @@ Line plots
3636
====================
3737
.. automethod:: Axes3D.plot
3838

39-
.. plot:: gallery/mplot3d/lines3d.py
39+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_lines3d_001.png
40+
:target: ../../gallery/mplot3d/lines3d.html
41+
:align: center
42+
:scale: 50
43+
44+
Lines3d
4045

4146
.. _scatter3d:
4247

4348
Scatter plots
4449
=============
4550
.. automethod:: Axes3D.scatter
4651

47-
.. plot:: gallery/mplot3d/scatter3d.py
52+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_scatter3d_001.png
53+
:target: ../../gallery/mplot3d/scatter3d.html
54+
:align: center
55+
:scale: 50
56+
57+
Scatter3d
4858

4959
.. _wireframe:
5060

5161
Wireframe plots
5262
===============
5363
.. automethod:: Axes3D.plot_wireframe
5464

55-
.. plot:: gallery/mplot3d/wire3d.py
65+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_wire3d_001.png
66+
:target: ../../gallery/mplot3d/wire3d.html
67+
:align: center
68+
:scale: 50
69+
70+
Wire3d
5671

5772
.. _surface:
5873

5974
Surface plots
6075
=============
6176
.. automethod:: Axes3D.plot_surface
6277

63-
.. plot:: gallery/mplot3d/surface3d.py
64-
.. plot:: gallery/mplot3d/surface3d_2.py
65-
.. plot:: gallery/mplot3d/surface3d_3.py
78+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_surface3d_001.png
79+
:target: ../../gallery/mplot3d/surface3d.html
80+
:align: center
81+
:scale: 50
82+
83+
Surface3d
84+
85+
Surface3d 2
86+
87+
Surface3d 3
6688

6789
.. _trisurface:
6890

6991
Tri-Surface plots
7092
=================
7193
.. automethod:: Axes3D.plot_trisurf
7294

73-
.. plot:: gallery/mplot3d/trisurf3d.py
95+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_trisurf3d_001.png
96+
:target: ../../gallery/mplot3d/trisurf3d.html
97+
:align: center
98+
:scale: 50
99+
100+
Trisurf3d
74101

75102

76103
.. _contour3d:
@@ -79,18 +106,31 @@ Contour plots
79106
=============
80107
.. automethod:: Axes3D.contour
81108

82-
.. plot:: gallery/mplot3d/contour3d.py
83-
.. plot:: gallery/mplot3d/contour3d_2.py
84-
.. plot:: gallery/mplot3d/contour3d_3.py
109+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_contour3d_001.png
110+
:target: ../../gallery/mplot3d/contour3d.html
111+
:align: center
112+
:scale: 50
113+
114+
Contour3d
115+
116+
Contour3d 2
117+
118+
Contour3d 3
85119

86120
.. _contourf3d:
87121

88122
Filled contour plots
89123
====================
90124
.. automethod:: Axes3D.contourf
91125

92-
.. plot:: gallery/mplot3d/contourf3d.py
93-
.. plot:: gallery/mplot3d/contourf3d_2.py
126+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_contourf3d_001.png
127+
:target: ../../gallery/mplot3d/contourf3d.html
128+
:align: center
129+
:scale: 50
130+
131+
Contourf3d
132+
133+
Contourf3d 2
94134

95135
.. versionadded:: 1.1.0
96136
The feature demoed in the second contourf3d example was enabled as a
@@ -102,37 +142,62 @@ Polygon plots
102142
====================
103143
.. automethod:: Axes3D.add_collection3d
104144

105-
.. plot:: gallery/mplot3d/polys3d.py
145+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_polys3d_001.png
146+
:target: ../../gallery/mplot3d/polys3d.html
147+
:align: center
148+
:scale: 50
149+
150+
Polys3d
106151

107152
.. _bar3d:
108153

109154
Bar plots
110155
====================
111156
.. automethod:: Axes3D.bar
112157

113-
.. plot:: gallery/mplot3d/bars3d.py
158+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_bars3d_001.png
159+
:target: ../../gallery/mplot3d/bars3d.html
160+
:align: center
161+
:scale: 50
162+
163+
Bars3d
114164

115165
.. _quiver3d:
116166

117167
Quiver
118168
====================
119169
.. automethod:: Axes3D.quiver
120170

121-
.. plot:: gallery/mplot3d/quiver3d.py
171+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_quiver3d_001.png
172+
:target: ../../gallery/mplot3d/quiver3d.html
173+
:align: center
174+
:scale: 50
175+
176+
Quiver3d
122177

123178
.. _2dcollections3d:
124179

125180
2D plots in 3D
126181
====================
127-
.. plot:: gallery/mplot3d/2dcollections3d.py
182+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_2dcollections3d_001.png
183+
:target: ../../gallery/mplot3d/2dcollections3d.html
184+
:align: center
185+
:scale: 50
186+
187+
2dcollections3d
128188

129189
.. _text3d:
130190

131191
Text
132192
====================
133193
.. automethod:: Axes3D.text
134194

135-
.. plot:: gallery/mplot3d/text3d.py
195+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_text3d_001.png
196+
:target: ../../gallery/mplot3d/text3d.html
197+
:align: center
198+
:scale: 50
199+
200+
Text3d
136201

137202
.. _3dsubplots:
138203

@@ -146,5 +211,31 @@ in the same figure.
146211
Subplotting 3D plots was added in v1.0.0. Earlier version can not
147212
do this.
148213

149-
.. plot:: gallery/mplot3d/subplot3d.py
150-
.. plot:: gallery/mplot3d/mixed_subplots.py
214+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_subplot3d_001.png
215+
:target: ../../gallery/mplot3d/subplot3d.html
216+
:align: center
217+
:scale: 50
218+
219+
Subplot3d
220+
221+
Mixed Subplots
222+
223+
224+
225+
226+
227+
228+
229+
230+
231+
232+
233+
234+
235+
236+
237+
238+
239+
240+
241+

doc/users/annotations.rst

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ keyword args like ``horizontalalignment``, ``verticalalignment`` and
8080
``fontsize`` are passed from `~matplotlib.Axes.annotate` to the
8181
``Text`` instance.
8282

83-
.. plot:: mpl_examples/pyplots/annotation_polar.py
84-
:include-source:
83+
.. figure:: ../gallery/pyplots/images/sphx_glr_annotation_polar_001.png
84+
:target: ../gallery/pyplots/annotation_polar.html
85+
:align: center
86+
:scale: 50
87+
88+
Annotation Polar
8589

8690
For more on all the wild and wonderful things you can do with
8791
annotations, including fancy arrows, see :ref:`plotting-guide-annotation`
@@ -144,7 +148,12 @@ keyword arguments. Currently, following box styles are implemented.
144148
Square ``square`` pad=0.3
145149
========== ============== ==========================
146150

147-
.. plot:: mpl_examples/pylab_examples/fancybox_demo2.py
151+
.. figure:: ../gallery/pylab_examples/images/sphx_glr_fancybox_demo2_001.png
152+
:target: ../gallery/pylab_examples/fancybox_demo2.html
153+
:align: center
154+
:scale: 50
155+
156+
Fancybox Demo2
148157

149158

150159
Note that the attribute arguments can be specified within the style
@@ -250,7 +259,12 @@ an arrow patch, according to the given ``arrowstyle``.
250259
``wedge`` tail_width=0.3,shrink_factor=0.5
251260
========== =============================================
252261

253-
.. plot:: mpl_examples/pylab_examples/fancyarrow_demo.py
262+
.. figure:: ../gallery/pylab_examples/images/sphx_glr_fancyarrow_demo_001.png
263+
:target: ../gallery/pylab_examples/fancyarrow_demo.html
264+
:align: center
265+
:scale: 50
266+
267+
Fancyarrow Demo
254268

255269
Some arrowstyles only work with connection styles that generate a
256270
quadratic-spline segment. They are ``fancy``, ``simple``, and ``wedge``.
@@ -465,7 +479,12 @@ knowledge of how mpl's transform works. But, utilizing it will be
465479
straight forward.
466480

467481

468-
.. plot:: mpl_examples/pylab_examples/axes_zoom_effect.py
482+
.. figure:: ../gallery/pylab_examples/images/sphx_glr_axes_zoom_effect_001.png
483+
:target: ../gallery/pylab_examples/axes_zoom_effect.html
484+
:align: center
485+
:scale: 50
486+
487+
Axes Zoom Effect
469488

470489

471490
Define Custom BoxStyle
@@ -501,3 +520,7 @@ matplotlib.patches.BoxStyle._Base as demonstrated below.
501520
Similarly, you can define a custom ConnectionStyle and a custom ArrowStyle.
502521
See the source code of ``lib/matplotlib/patches.py`` and check
503522
how each style class is defined.
523+
524+
525+
526+

doc/users/artists.rst

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ drawing of the ticks, tick labels and axis labels.
133133
134134
Try creating the figure below.
135135

136-
.. plot:: mpl_examples/pyplots/fig_axes_labels_simple.py
136+
.. figure:: ../gallery/pyplots/images/sphx_glr_fig_axes_labels_simple_001.png
137+
:target: ../gallery/pyplots/fig_axes_labels_simple.html
138+
:align: center
139+
:scale: 50
140+
141+
Fig Axes Labels Simple
137142

138143
.. _customizing-artists:
139144

@@ -323,7 +328,12 @@ obtain by setting the ``Artist`` transform to :attr:`fig.transFigure
323328

324329
In [195]: fig.canvas.draw()
325330

326-
.. plot:: mpl_examples/pyplots/fig_x.py
331+
.. figure:: ../gallery/pyplots/images/sphx_glr_fig_x_001.png
332+
:target: ../gallery/pyplots/fig_x.html
333+
:align: center
334+
:scale: 50
335+
336+
Fig X
327337

328338

329339
Here is a summary of the Artists the figure contains
@@ -598,8 +608,12 @@ grid Turn the grid on or off for the major or minor ticks
598608
Here is an example, not recommended for its beauty, which customizes
599609
the axes and tick properties
600610

601-
.. plot:: mpl_examples/pyplots/fig_axes_customize_simple.py
602-
:include-source:
611+
.. figure:: ../gallery/pyplots/images/sphx_glr_fig_axes_customize_simple_001.png
612+
:target: ../gallery/pyplots/fig_axes_customize_simple.html
613+
:align: center
614+
:scale: 50
615+
616+
Fig Axes Customize Simple
603617

604618

605619
.. _tick-container:
@@ -635,5 +649,14 @@ label2On boolean which determines whether to draw the 2nd tick label
635649
Here is an example which sets the formatter for the right side ticks with
636650
dollar signs and colors them green on the right side of the yaxis
637651

638-
.. plot:: mpl_examples/pyplots/dollar_ticks.py
639-
:include-source:
652+
.. figure:: ../gallery/pyplots/images/sphx_glr_dollar_ticks_001.png
653+
:target: ../gallery/pyplots/dollar_ticks.html
654+
:align: center
655+
:scale: 50
656+
657+
Dollar Ticks
658+
659+
660+
661+
662+

doc/users/mathtext.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,5 +340,11 @@ Example
340340

341341
Here is an example illustrating many of these features in context.
342342

343-
.. plot:: mpl_examples/pyplots/pyplot_mathtext.py
344-
:include-source:
343+
.. figure:: ../gallery/pyplots/images/sphx_glr_pyplot_mathtext_001.png
344+
:target: ../gallery/pyplots/pyplot_mathtext.html
345+
:align: center
346+
:scale: 50
347+
348+
Pyplot Mathtext
349+
350+

0 commit comments

Comments
 (0)