Skip to content

Commit

Permalink
ENH: Also accept empty figures as plot arg
Browse files Browse the repository at this point in the history
  • Loading branch information
vidartf committed Nov 6, 2015
1 parent 4a5c06d commit 2d574a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hyperspy/misc/image_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ def estimate_image_shift(ref, image, roi=None, sobel=True,
if isinstance(plot, plt.Figure):
f = plot
axarr = plot.axes
if len(axarr) < 3:
for i in xrange(3):
f.add_subplot(3, 1, i)
axarr = plot.axes
else:
f, axarr = plt.subplots(1, 3)
full_plot = len(axarr[0].images) == 0
Expand Down

0 comments on commit 2d574a6

Please sign in to comment.