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

Skip to content

Commit 7b57b27

Browse files
committed
Improve docs for mplot3d.
1 parent 30dc21a commit 7b57b27

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

doc/mpl_toolkits/mplot3d/index.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ Matplotlib mplot3d toolkit
99
==========================
1010
The mplot3d toolkit adds simple 3d plotting capabilities to matplotlib by
1111
supplying an axis object that can create a 2d projection of a 3d scene.
12-
In the end it produces a list of 2d lines and patches that are drawn by the
13-
normal matplotlib code. Therefore the resulting graph will have the same look
14-
and feel as regular 2d plots.
12+
The resulting graph will have the same look and feel as regular 2d plots.
1513

16-
Interactive backends also provide the ability to rotate and zoom the 3d scene.
14+
The interactive backends also provide the ability to rotate and zoom
15+
the 3d scene.
1716

1817
.. toctree::
1918
:maxdepth: 2

doc/mpl_toolkits/mplot3d/tutorial.rst

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ add a new axes to it of type :class:`~mpl_toolkits.mplot3d.Axes3D`::
1717
fig = plt.figure()
1818
ax = fig.add_subplot(111, projection='3d')
1919

20+
.. versionadded:: 1.0.0
21+
This approach is the preferred method of creating a 3d axes.
22+
23+
.. note::
24+
Prior to version 1.0.0, the method of creating a 3d axes was
25+
different. For those using older versions of matplotlib, change
26+
``ax = fig.add_subplot(111, projection='3d')``
27+
to ``ax = Axes3D(fig)``.
28+
2029
Line plots
2130
====================
2231
.. automethod:: Axes3D.plot
@@ -56,6 +65,7 @@ Filled contour plots
5665
.. automethod:: Axes3D.contourf
5766

5867
.. plot:: mpl_examples/mplot3d/contourf3d_demo.py
68+
.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py
5969

6070
Polygon plots
6171
====================
@@ -81,9 +91,12 @@ Text
8191

8292
Subplotting
8393
====================
84-
Having multiple 3D plots in a single figure is the same
85-
as it is for 2D plots. And you can mix 2D and 3D plots
94+
Having multiple 3d plots in a single figure is the same
95+
as it is for 2d plots. And you can mix 2d and 3d plots
8696
into the same figure.
8797

98+
.. versionadded:: 1.0.0
99+
This feature was added in v1.0.0. Earlier version can not do this.
100+
88101
.. plot:: mpl_examples/mplot3d/subplot3d_demo.py
89102
.. plot:: mpl_examples/mplot3d/mixed_subplots_demo.py

0 commit comments

Comments
 (0)