8000 Register 3d projection by default. by anntzer · Pull Request #13520 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Register 3d projection by default. #13520

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 1 commit into from
Feb 27, 2019
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
5 changes: 5 additions & 0 deletions doc/api/next_api_changes/2019-02-26-AL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mplot3d is always registered by default
```````````````````````````````````````

It is not necessary to import mplot3d anymore to create 3d axes with
``fig.add_subplot(111, projection="3d")``.
1 change: 0 additions & 1 deletion doc/users/next_whats_new/2019-01-06-shaded-voxels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ The plot below shows how this affects the output.

import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

# prepare some coordinates
x, y, z = np.indices((8, 8, 8))
Expand Down
2 changes: 0 additions & 2 deletions examples/frontpage/3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
This example reproduces the frontpage 3D example.

"""
# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

from matplotlib import cbook
from matplotlib import cm
Expand Down
3 changes: 0 additions & 3 deletions examples/mplot3d/2dcollections3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
selective axes of a 3D plot.
"""

# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

import numpy as np
import matplotlib.pyplot as plt

Expand Down
2 changes: 0 additions & 2 deletions examples/mplot3d/3d_bars.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

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


# setup the figure and axes
Expand Down
3 changes: 0 additions & 3 deletions examples/mplot3d/bars3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
planes y=0, y=1, etc.
"""

# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

import matplotlib.pyplot as plt
import numpy as np

Expand Down
3 changes: 0 additions & 3 deletions examples/mplot3d/custom_shaded_3d_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
Demonstrates using custom hillshading in a 3D surface plot.
"""

# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

from matplotlib import cbook
from matplotlib import cm
from matplotlib.colors import LightSource
Expand Down
3 changes: 0 additions & 3 deletions examples/mplot3d/hist3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
Demo of a histogram for 2 dimensional data as a bar graph in 3D.
"""

# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

import matplotlib.pyplot as plt
import numpy as np

Expand Down
3 changes: 0 additions & 3 deletions examples/mplot3d/lines3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
This example demonstrates plotting a parametric curve in 3D.
'''

# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

import numpy as np
import matplotlib.pyplot as plt

Expand Down
2 changes: 0 additions & 2 deletions examples/mplot3d/lorenz_attractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

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


def lorenz(x, y, z, s=10, r=28, b=2.667):
Expand Down
2 changes: 0 additions & 2 deletions examples/mplot3d/mixed_subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

This example shows a how to plot a 2D and 3D plot on the same figure.
"""
# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

import matplotlib.pyplot as plt
import numpy as np
Expand Down
3 changes: 0 additions & 3 deletions examples/mplot3d/offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
automatically trigger it.
'''

# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

import matplotlib.pyplot as plt
import numpy as np

Expand Down
2 changes: 0 additions & 2 deletions examples/mplot3d/pathpatch3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from matplotlib.patches import Circle, PathPatch
from matplotlib.text import TextPath
from matplotlib.transforms import Affine2D
# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
import mpl_toolkits.mplot3d.art3d as art3d


Expand Down
3 changes: 0 additions & 3 deletions examples/mplot3d/polys3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
of 'jagged stained glass' effect.
"""

# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

from matplotlib.collections import PolyCollection
import matplotlib.pyplot as plt
from matplotlib import colors as mcolors
Expand Down
3 changes: 0 additions & 3 deletions examples/mplot3d/quiver3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
Demonstrates plotting directional arrows at points on a 3d meshgrid.
'''

# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

import matplotlib.pyplot as plt
import numpy as np

Expand Down
3 changes: 0 additions & 3 deletions examples/mplot3d/scatter3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
Demonstration of a basic scatterplot in 3D.
'''

# This import registers the 3D projection, but is otherwise unused.
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import

import matplotlib.pyplot as plt
import numpy as np

Expand Down
2 changes: 0 additions & 2 deletions examples/mplot3d/subplot3d.py