mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-17 11:32:45 +08:00
Create a new figure for imshow if there is already data
This commit is contained in:
@@ -2,6 +2,8 @@ import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
def imshow(*args, **kwargs):
|
||||
if plt.gca().has_data():
|
||||
plt.figure()
|
||||
kwargs.setdefault('interpolation', 'nearest')
|
||||
kwargs.setdefault('cmap', 'gray')
|
||||
plt.imshow(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user