Skip to content

Commit

Permalink
Default units to pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
willGraham01 committed Feb 4, 2025
1 parent a5ae259 commit 3fe51e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions movement/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def occupancy_histogram(
title = "Occupancy of " + ", ".join(title_components)
if title:
ax.set_title(title)
ax.set_xlabel(x_coord)
ax.set_ylabel(y_coord)
space_unit = data.attrs.get("space_unit", "pixels")
ax.set_xlabel(f"{x_coord} ({space_unit})")
ax.set_ylabel(f"{y_coord} ({space_unit})")

return fig, ax, {"counts": counts, "xedges": xedges, "yedges": yedges}

0 comments on commit 3fe51e8

Please sign in to comment.