Skip to content

Commit 66d2282

Browse files
authored
Merge pull request #11651 from QuLogic/example-imports
Remove unused imports in examples
2 parents cb127ba + bed25a8 commit 66d2282

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+96
-73
lines changed

examples/event_handling/ginput_manual_clabel_sgskip.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@
1414
1515
"""
1616

17-
1817
import time
19-
import matplotlib
18+
2019
import numpy as np
21-
import matplotlib.cm as cm
22-
import matplotlib.mlab as mlab
2320
import matplotlib.pyplot as plt
2421

2522

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/images_contours_and_fields/contour_label_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
import matplotlib
1414
import numpy as np
15-
import matplotlib.cm as cm
1615
import matplotlib.ticker as ticker
1716
import matplotlib.pyplot as plt
1817

examples/images_contours_and_fields/figimage_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"""
99
import numpy as np
1010
import matplotlib
11-
import matplotlib.cm as cm
1211
import matplotlib.pyplot as plt
1312

1413

examples/images_contours_and_fields/quadmesh_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
import copy
1313

14-
from matplotlib import cm, colors, pyplot as plt
14+
from matplotlib import cm, pyplot as plt
1515
import numpy as np
1616

1717
n = 12

examples/images_contours_and_fields/quiver_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"""
1414
import matplotlib.pyplot as plt
1515
import numpy as np
16-
from numpy import ma
1716

1817
X, Y = np.meshgrid(np.arange(0, 2 * np.pi, .2), np.arange(0, 2 * np.pi, .2))
1918
U = np.cos(X)

examples/lines_bars_and_markers/scatter_symbol.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"""
99
import matplotlib.pyplot as plt
1010
import numpy as np
11-
import matplotlib
1211

1312
# Fixing random state for reproducibility
1413
np.random.seed(19680801)

examples/misc/load_converter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import numpy as np
88
import matplotlib.pyplot as plt
99
import matplotlib.cbook as cbook
10-
import matplotlib.dates as mdates
1110
from matplotlib.dates import bytespdate2num
1211

1312
datafile = cbook.get_sample_data('msft.csv', asfileobj=False)

examples/misc/plotfile_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
Example use of ``plotfile`` to plot data directly from a file.
77
"""
88
import matplotlib.pyplot as plt
9-
import numpy as np
10-
119
import matplotlib.cbook as cbook
1210

1311
fname = cbook.get_sample_data('msft.csv', asfileobj=False)

examples/misc/transoffset.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import matplotlib.transforms as mtransforms
2424
import numpy as np
2525

26-
from matplotlib.transforms import offset_copy
2726

2827
xs = np.arange(7)
2928
ys = xs**2

0 commit comments

Comments
 (0)