File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -631,7 +631,16 @@ def _crop_window(xy: np.ndarray) -> np.ndarray:
631631 ax .add_collection (pc )
632632
633633 # ────────────────────────────── final cosmetics ────────────────────────
634- # ax.set_aspect("equal")
634+ if plane in ['xy' , 'yx' ]:
635+ ax .set_aspect ('equal' , adjustable = 'box' )
636+
637+ if unit is None :
638+ unit_str = "" if scl_skel == 1.0 else f"(×{ scl_skel :g} )"
639+ else :
640+ unit_str = f"({ unit } )"
641+
642+ ax .set_xlabel (f"{ plane [0 ]} { unit_str } " )
643+ ax .set_ylabel (f"{ plane [1 ]} { unit_str } " )
635644
636645 # guarantee limits if user requested specific window
637646 if xlim is not None :
@@ -977,7 +986,16 @@ def _mask_window(xy: np.ndarray) -> np.ndarray:
977986 ax .add_patch (ell )
978987
979988 # ────────────── cosmetics & labels ────────────────────────────────────
980- ax .set_aspect ("equal" )
989+ if plane in ['xy' , 'yx' ]:
990+ ax .set_aspect ("equal" , adjustable = "box" )
991+
992+ if unit is None :
993+ ax .set_xlabel (f"{ plane [0 ]} " )
994+ ax .set_ylabel (f"{ plane [1 ]} " )
995+ else :
996+ ax .set_xlabel (f"{ plane [0 ]} ({ unit } )" )
997+ ax .set_ylabel (f"{ plane [1 ]} ({ unit } )" )
998+
981999
9821000 if xlim is not None :
9831001 ax .set_xlim (xlim )
You can’t perform that action at this time.
0 commit comments