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

Skip to content

Commit 699f35e

Browse files
timhoffmImportanceOfBeingErnest
authored andcommitted
Remove borders from barcode example (#13817)
1 parent 628ab4e commit 699f35e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/images_contours_and_fields/barcode_demo.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@
1414
# the bar
1515
x = np.random.rand(500) > 0.7
1616

17-
axprops = dict(xticks=[], yticks=[])
1817
barprops = dict(aspect='auto', cmap='binary', interpolation='nearest')
1918

2019
fig = plt.figure()
2120

2221
# a vertical barcode
23-
ax1 = fig.add_axes([0.1, 0.3, 0.1, 0.6], **axprops)
22+
ax1 = fig.add_axes([0.1, 0.1, 0.1, 0.8])
23+
ax1.set_axis_off()
2424
ax1.imshow(x.reshape((-1, 1)), **barprops)
2525

2626
# a horizontal barcode
27-
ax2 = fig.add_axes([0.3, 0.1, 0.6, 0.1], **axprops)
27+
ax2 = fig.add_axes([0.3, 0.4, 0.6, 0.2])
28+
ax2.set_axis_off()
2829
ax2.imshow(x.reshape((1, -1)), **barprops)
2930

3031
plt.show()

0 commit comments

Comments
 (0)