mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-13 17:45:20 +08:00
changed adjustable parameter of axes to 'box-forced'
this fixes the size of axes around an image for shared axes
This commit is contained in:
@@ -95,6 +95,7 @@ fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(8, 4), sharex=True, sharey=True)
|
||||
ax1.axis('off')
|
||||
ax1.imshow(image, cmap=plt.cm.gray)
|
||||
ax1.set_title('Input image')
|
||||
ax1.set_adjustable('box-forced')
|
||||
|
||||
# Rescale histogram for better display
|
||||
hog_image_rescaled = exposure.rescale_intensity(hog_image, in_range=(0, 0.02))
|
||||
@@ -102,4 +103,5 @@ hog_image_rescaled = exposure.rescale_intensity(hog_image, in_range=(0, 0.02))
|
||||
ax2.axis('off')
|
||||
ax2.imshow(hog_image_rescaled, cmap=plt.cm.gray)
|
||||
ax2.set_title('Histogram of Oriented Gradients')
|
||||
ax1.set_adjustable('box-forced')
|
||||
plt.show()
|
||||
|
||||
Reference in New Issue
Block a user