Skip to content

Commit

Permalink
Expose figsize
Browse files Browse the repository at this point in the history
  • Loading branch information
cwindolf committed Jan 15, 2024
1 parent 86ef67f commit 7e8ae10
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/dartsort/vis/scatterplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def scatter_spike_features(
limits="probe_margin",
label_axes=True,
random_seed=0,
figsize=None,
**scatter_kw,
):
"""3-axis scatter plot of spike depths vs. horizontal pos, amplitude, and time
Expand All @@ -47,7 +48,10 @@ def scatter_spike_features(
figure = plt.gcf()
if axes is None:
axes = figure.subplots(
ncols=3, sharey=True, gridspec_kw=dict(width_ratios=width_ratios)
ncols=3,
sharey=True,
gridspec_kw=dict(width_ratios=width_ratios),
figsize=figsize,
)

if hdf5_filename is not None:
Expand Down Expand Up @@ -263,7 +267,9 @@ def scatter_x_vs_depth(
if show_geom and geom is not None:
ax.scatter(*geom.T, **geom_scatter_kw)
if limits == "probe_margin" and geom is not None:
ax.set_xlim([geom[:, 0].min() - probe_margin_um, geom[:, 0].max() + probe_margin_um])
ax.set_xlim(
[geom[:, 0].min() - probe_margin_um, geom[:, 0].max() + probe_margin_um]
)
return ax, s1


Expand Down Expand Up @@ -407,5 +413,7 @@ def scatter_feature_vs_depth(
**scatter_kw,
)
if limits == "probe_margin" and geom is not None:
ax.set_ylim([geom[:, 1].min() - probe_margin_um, geom[:, 1].max() + probe_margin_um])
ax.set_ylim(
[geom[:, 1].min() - probe_margin_um, geom[:, 1].max() + probe_margin_um]
)
return ax, s

0 comments on commit 7e8ae10

Please sign in to comment.