Skip to content

Commit

Permalink
Minor fix to fig,ax inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
cophus committed Oct 22, 2024
1 parent baf9e30 commit e3f4c9c
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions py4DSTEM/process/polar/polar_peaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,29 @@ def find_peaks_single_pattern(
ct = np.cos(t)
st = np.sin(t)

fig, ax = plt.subplots(figsize=figsize)

cmap = kwargs.pop("cmap", "gray")
vmax = kwargs.pop("vmax", 1)
vmin = kwargs.pop("vmin", 0)
show(im_plot, figax=(fig, ax), cmap=cmap, vmax=vmax, vmin=vmin, **kwargs)

if 'figax' in kwargs:
fig,ax = kwargs['figax']
show(
im_plot,
cmap=cmap,
vmax=vmax,
vmin=vmin,
**kwargs,
)
else:
fig, ax = plt.subplots(figsize=figsize)
show(
im_plot,
figax=(fig, ax),
cmap=cmap,
vmax=vmax,
vmin=vmin,
**kwargs,
)

# peaks
ax.scatter(
Expand Down

0 comments on commit e3f4c9c

Please sign in to comment.