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

Skip to content

Commit bed25a8

Browse files
committed
Annotate reason for Axes3D import in examples.
1 parent f04a33a commit bed25a8

30 files changed

Lines changed: 92 additions & 34 deletions

examples/frontpage/3D.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
This example reproduces the frontpage 3D example.
77
88
"""
9-
from mpl_toolkits.mplot3d import Axes3D
9+
# This import registers the 3D projection, but is otherwise unused.
10+
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
11+
1012
from matplotlib import cbook
1113
from matplotlib import cm
1214
from matplotlib.colors import LightSource

examples/mplot3d/2dcollections3d.py

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

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

examples/mplot3d/3d_bars.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
import numpy as np
1212
import matplotlib.pyplot as plt
13-
from mpl_toolkits.mplot3d import Axes3D
13+
# This import registers the 3D projection, but is otherwise unused.
14+
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
1415

1516

1617
# setup the figure and axes

examples/mplot3d/bars3d.py

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

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

examples/mplot3d/custom_shaded_3d_surface.py

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

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

examples/mplot3d/hist3d.py

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

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

examples/mplot3d/lines3d.py

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

9-
import matplotlib as mpl
10-
from mpl_toolkits.mplot3d import Axes3D
9+
# This import registers the 3D projection, but is otherwise unused.
10+
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
11+
1112
import numpy as np
1213
import matplotlib.pyplot as plt
1314

14-
mpl.rcParams['legend.fontsize'] = 10
15+
16+
plt.rcParams['legend.fontsize'] = 10
1517

1618
fig = plt.figure()
1719
ax = fig.gca(projection='3d')

examples/mplot3d/lorenz_attractor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

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

2021

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

examples/mplot3d/mixed_subplots.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
66
This example shows a how to plot a 2D and 3D plot on the same figure.
77
"""
8-
from mpl_toolkits.mplot3d import Axes3D
8+
# This import registers the 3D projection, but is otherwise unused.
9+
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
10+
911
import matplotlib.pyplot as plt
1012
import numpy as np
1113

examples/mplot3d/offset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
automatically trigger it.
1414
'''
1515

16-
from mpl_toolkits.mplot3d import Axes3D
16+
# This import registers the 3D projection, but is otherwise unused.
17+
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
18+
1719
import matplotlib.pyplot as plt
1820
import numpy as np
1921

0 commit comments

Comments
 (0)