Skip to content

Commit cd0de0b

Browse files
authored
Merge pull request #13520 from anntzer/register3d
Register 3d projection by default.
2 parents 85eb5eb + 821b5ed commit cd0de0b

34 files changed

+9
-94
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mplot3d is always registered by default
2+
```````````````````````````````````````
3+
4+
It is not necessary to import mplot3d anymore to create 3d axes with
5+
``fig.add_subplot(111, projection="3d")``.

doc/users/next_whats_new/2019-01-06-shaded-voxels.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ The plot below shows how this affects the output.
1212

1313
import matplotlib.pyplot as plt
1414
import numpy as np
15-
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
1615

1716
# prepare some coordinates
1817
x, y, z = np.indices((8, 8, 8))

examples/frontpage/3D.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
This example reproduces the frontpage 3D example.
77
88
"""
9-
# This import registers the 3D projection, but is otherwise unused.
10-
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
119

1210
from matplotlib import cbook
1311
from matplotlib import cm

examples/mplot3d/2dcollections3d.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
selective axes of a 3D plot.
88
"""
99

10-
# This import registers the 3D projection, but is otherwise unused.
11-
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
12-
1310
import numpy as np
1411
import matplotlib.pyplot as plt
1512

examples/mplot3d/3d_bars.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
import numpy as np
1010
import matplotlib.pyplot as plt
11-
# This import registers the 3D projection, but is otherwise unused.
12-
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
1311

1412

1513
# setup the figure and axes

examples/mplot3d/bars3d.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
planes y=0, y=1, etc.
88
"""
99

10-
# This import registers the 3D projection, but is otherwise unused.
11-
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
12-
1310
import matplotlib.pyplot as plt
1411
import numpy as np
1512

examples/mplot3d/custom_shaded_3d_surface.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
Demonstrates using custom hillshading in a 3D surface plot.
77
"""
88

9-
# This import registers the 3D projection, but is otherwise unused.
10-
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
11-
129
from matplotlib import cbook
1310
from matplotlib import cm
1411
from matplotlib.colors import LightSource

examples/mplot3d/hist3d.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
Demo of a histogram for 2 dimensional data as a bar graph in 3D.
77
"""
88

9-
# This import registers the 3D projection, but is otherwise unused.
10-
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
11-
129
import matplotlib.pyplot as plt
1310
import numpy as np
1411

examples/mplot3d/lines3d.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
This example demonstrates plotting a parametric curve in 3D.
77
'''
88

9-
# This import registers the 3D projection, but is otherwise unused.
10-
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
11-
129
import numpy as np
1310
import matplotlib.pyplot as plt
1411

examples/mplot3d/lorenz_attractor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
import numpy as np
1818
import matplotlib.pyplot as plt
19-
# This import registers the 3D projection, but is otherwise unused.
20-
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
2119

2220

2321
def lorenz(x, y, z, s=10, r=28, b=2.667):

0 commit comments

Comments
 (0)