Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import matplotlib.patches as mpatches
- from matplotlib.collections import PatchCollection
- n = 6
- patches = [mpatches.RegularPolygon((0,0), n)]
- fig, ax = plt.subplots()
- collection = PatchCollection(patches)
- ax.add_collection(collection)
- plt.axis('equal')
- plt.axis('off')
- plt.tight_layout()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement