diff --git a/examples/axisartist/demo_axis_direction.py b/examples/axisartist/demo_axis_direction.py index 28de0f380c02..d4c8f817b5cc 100644 --- a/examples/axisartist/demo_axis_direction.py +++ b/examples/axisartist/demo_axis_direction.py @@ -74,7 +74,6 @@ def add_floating_axis2(ax1): fig = plt.figure(figsize=(8, 4)) -fig.clf() fig.subplots_adjust(left=0.01, right=0.99, bottom=0.01, top=0.99, wspace=0.01, hspace=0.01) diff --git a/examples/axisartist/demo_curvelinear_grid.py b/examples/axisartist/demo_curvelinear_grid.py index ef63839baabc..8fb4ef6b9d95 100644 --- a/examples/axisartist/demo_curvelinear_grid.py +++ b/examples/axisartist/demo_curvelinear_grid.py @@ -130,9 +130,9 @@ def curvelinear_test2(fig): ax1.grid(True, zorder=0) + if 1: fig = plt.figure(figsize=(7, 4)) - fig.clf() curvelinear_test1(fig) curvelinear_test2(fig) diff --git a/examples/axisartist/demo_curvelinear_grid2.py b/examples/axisartist/demo_curvelinear_grid2.py index 0441aa341aa2..ca9fdbdc784f 100644 --- a/examples/axisartist/demo_curvelinear_grid2.py +++ b/examples/axisartist/demo_curvelinear_grid2.py @@ -66,7 +66,5 @@ def inv_tr(x, y): if 1: fig = plt.figure(figsize=(7, 4)) - fig.clf() - curvelinear_test1(fig) plt.show() diff --git a/examples/axisartist/demo_floating_axis.py b/examples/axisartist/demo_floating_axis.py index 76018489525f..4915df1c107e 100644 --- a/examples/axisartist/demo_floating_axis.py +++ b/examples/axisartist/demo_floating_axis.py @@ -64,9 +64,7 @@ def curvelinear_test2(fig): ax1.grid(True) -fig = plt.figure(figsize=(5, 5)) -fig.clf() +fig = plt.figure(figsize=(5, 5)) curvelinear_test2(fig) - plt.show() diff --git a/examples/axisartist/simple_axis_pad.py b/examples/axisartist/simple_axis_pad.py index 69dc318dceac..cac9d84915b3 100644 --- a/examples/axisartist/simple_axis_pad.py +++ b/examples/axisartist/simple_axis_pad.py @@ -74,7 +74,6 @@ def add_floating_axis2(ax1): fig = plt.figure(figsize=(9, 3.)) -fig.clf() fig.subplots_adjust(left=0.01, right=0.99, bottom=0.01, top=0.99, wspace=0.01, hspace=0.01) diff --git a/examples/text_labels_and_annotations/demo_text_rotation_mode.py b/examples/text_labels_and_annotations/demo_text_rotation_mode.py index d79971887740..4eb8ae528b43 100644 --- a/examples/text_labels_and_annotations/demo_text_rotation_mode.py +++ b/examples/text_labels_and_annotations/demo_text_rotation_mode.py @@ -45,8 +45,6 @@ def test_rotation_mode(fig, mode, subplot_location): if 1: import matplotlib.pyplot as plt fig = plt.figure(figsize=(5.5, 4)) - fig.clf() - test_rotation_mode(fig, "default", 121) test_rotation_mode(fig, "anchor", 122) plt.show() diff --git a/lib/matplotlib/offsetbox.py b/lib/matplotlib/offsetbox.py index b2a86e744cca..b77c5bdfac78 100644 --- a/lib/matplotlib/offsetbox.py +++ b/lib/matplotlib/offsetbox.py @@ -1753,7 +1753,6 @@ def update_offset(self, dx, dy): if __name__ == "__main__": import matplotlib.pyplot as plt fig = plt.figure() - fig.clf() ax = plt.subplot(121) #txt = ax.text(0.5, 0.5, "Test", size=30, ha="center", color="w") diff --git a/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py b/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py index 929c0368a04a..7105a64808be 100644 --- a/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py +++ b/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py @@ -14,8 +14,6 @@ def test_subplot(): fig = plt.figure(figsize=(5, 5)) - fig.clf() - ax = Subplot(fig, 111) fig.add_subplot(ax) @@ -24,7 +22,6 @@ def test_subplot(): extensions=['png'], style='default', tol=0.01) def test_curvelinear3(): fig = plt.figure(figsize=(5, 5)) - fig.clf() tr = (mtransforms.Affine2D().scale(np.pi / 180, 1) + mprojections.PolarAxes.PolarTransform()) @@ -80,7 +77,6 @@ def test_curvelinear3(): extensions=['png'], style='default', tol=0.015) def test_curvelinear4(): fig = plt.figure(figsize=(5, 5)) - fig.clf() tr = (mtransforms.Affine2D().scale(np.pi / 180, 1) + mprojections.PolarAxes.PolarTransform())