10000 No clf() needed after creating a figure by timhoffm · Pull Request #11998 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

No clf() needed after creating a figure #11998

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
Sep 2, 2018
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
1 change: 0 additions & 1 deletion examples/axisartist/demo_axis_direction.py
8000
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion examples/axisartist/demo_curvelinear_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions examples/axisartist/demo_curvelinear_grid2.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,5 @@ def inv_tr(x, y):

if 1:
fig = plt.figure(figsize=(7, 4))
fig.clf()

curvelinear_test1(fig)
plt.show()
4 changes: 1 addition & 3 deletions examples/axisartist/demo_floating_axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
1 change: 0 additions & 1 deletion examples/axisartist/simple_axis_pad.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
1 change: 0 additions & 1 deletion lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 0 additions & 4 deletions lib/mpl_toolkits/tests/test_axisartist_floating_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

def test_subplot():
fig = plt.figure(figsize=(5, 5))
fig.clf()

ax = Subplot(fig, 111)
fig.add_subplot(ax)

Expand All @@ -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())
Expand Down Expand Up @@ -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())
Expand Down
0