8000 Update examples/shapes_and_collections/hatches_styles.py · matplotlib/matplotlib@eed0525 · GitHub
[go: up one dir, main page]

Skip to content

Commit eed0525

Browse files
forrestmQuLogic
andauthored
Update examples/shapes_and_collections/hatches_styles.py
Use ax instead of plt to adjust axis properties. Using fig tight_layout instead of plt. Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent f8aaa68 commit eed0525

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/shapes_and_collections/hatches_styles.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
ax.add_patch(Rectangle(p, 2, 2, fill=False, hatch=h))
2525
ax.text(t[0], t[1], h, fontsize=15)
2626

27-
plt.axis('equal')
28-
plt.axis('off')
29-
plt.tight_layout()
27+
ax.axis('equal')
28+
ax.axis('off')
29+
fig.tight_layout()
3030

3131
plt.show()
3232

0 commit comments

Comments
 (0)
0