Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3af7102

Browse files
committed
Clean up artist_reference.py
1 parent 48503a2 commit 3af7102

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

examples/shapes_and_collections/artist_reference.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def label(xy, text):
5858
label(grid[4], "Ellipse")
5959

6060
# add an arrow
61-
arrow = mpatches.Arrow(grid[5, 0] - 0.05, grid[5, 1] - 0.05, 0.1, 0.1, width=0.1)
61+
arrow = mpatches.Arrow(grid[5, 0] - 0.05, grid[5, 1] - 0.05, 0.1, 0.1,
62+
width=0.1)
6263
patches.append(arrow)
6364
label(grid[5], "Arrow")
6465

@@ -67,14 +68,13 @@ def label(xy, text):
6768
path_data = [
6869
(Path.MOVETO, [0.018, -0.11]),
6970
(Path.CURVE4, [-0.031, -0.051]),
70-
(Path.CURVE4, [-0.115, 0.073]),
71-
(Path.CURVE4, [-0.03 , 0.073]),
72-
(Path.LINETO, [-0.011, 0.039]),
73-
(Path.CURVE4, [0.043, 0.121]),
71+
(Path.CURVE4, [-0.115, 0.073]),
72+
(Path.CURVE4, [-0.03, 0.073]),
73+
(Path.LINETO, [-0.011, 0.039]),
74+
(Path.CURVE4, [0.043, 0.121]),
7475
(Path.CURVE4, [0.075, -0.005]),
7576
(Path.CURVE4, [0.035, -0.027]),
76-
(Path.CLOSEPOLY, [0.018, -0.11])
77-
]
77+
(Path.CLOSEPOLY, [0.018, -0.11])]
7878
codes, verts = zip(*path_data)
7979
path = mpath.Path(verts + grid[6], codes)
8080
patch = mpatches.PathPatch(path)
@@ -99,8 +99,8 @@ def label(xy, text):
9999
ax.add_collection(collection)
100100
ax.add_line(line)
101101

102-
plt.subplots_adjust(left=0, right=1, bottom=0, top=1)
103102
plt.axis('equal')
104103
plt.axis('off')
104+
plt.tight_layout()
105105

106106
plt.show()

0 commit comments

Comments
 (0)