@@ -1106,7 +1106,7 @@ def _round_ticks(values: np.ndarray, sig: int = 2) -> np.ndarray:
11061106 return rounded
11071107
11081108
1109- def _arcsec_labels (ticks ) -> List [str ]:
1109+ def _arcsec_labels (ticks , symbol_over_decimal : Optional [ bool ] = None ) -> List [str ]:
11101110 """Format tick values as arcsecond coordinate strings.
11111111
11121112 Whole-number tick sets render without a decimal point, so
@@ -1117,6 +1117,16 @@ def _arcsec_labels(ticks) -> List[str]:
11171117 decimal labels keep the suffix form ``3.8"``. When
11181118 ``ticks.symbol_over_decimal`` is true, labels use the double-prime arcsecond
11191119 symbol and decimal labels place it over the decimal point, e.g. ``3.″8``.
1120+
1121+ Parameters
1122+ ----------
1123+ ticks
1124+ The tick values to label.
1125+ symbol_over_decimal
1126+ Per-call override of the ``ticks.symbol_over_decimal`` config flag.
1127+ ``True`` forces the symbol-over-decimal form and ``False`` forces the
1128+ suffix form, whatever the config says. ``None`` (the default) reads
1129+ the config, so callers that do not pass it behave exactly as before.
11201130 """
11211131 minus_in_math = _conf_ticks_flag ("minus_in_math" , False )
11221132
@@ -1132,7 +1142,9 @@ def _fmt_minus(label: str) -> str:
11321142 label if "." in label else f"{ float (v ):.1f} "
11331143 for label , v in zip (labels , ticks )
11341144 ]
1135- if _conf_ticks_flag ("symbol_over_decimal" , False ):
1145+ if symbol_over_decimal is None :
1146+ symbol_over_decimal = _conf_ticks_flag ("symbol_over_decimal" , False )
1147+ if symbol_over_decimal :
11361148 symbol_labels = []
11371149 for label in labels :
11381150 if "." in label :
@@ -1147,13 +1159,18 @@ def _fmt_minus(label: str) -> str:
11471159def apply_extent (
11481160 ax ,
11491161 extent : Tuple [float , float , float , float ],
1162+ symbol_over_decimal : Optional [bool ] = None ,
11501163) -> None :
11511164 """
11521165 Apply axis limits and inward-pulled, rounded, arcsecond-labelled ticks to *ax*.
11531166
11541167 Tick count and inward factor are read from ``visualize/general.yaml``
11551168 (``ticks.number_of_ticks_2d`` and ``ticks.extent_factor_2d``), defaulting
11561169 to 3 ticks and factor 0.75.
1170+
1171+ ``symbol_over_decimal`` is a per-call override of the
1172+ ``ticks.symbol_over_decimal`` config flag, forwarded to
1173+ :func:`_arcsec_labels`; ``None`` (the default) reads the config.
11571174 """
11581175 factor = _conf_ticks ("extent_factor_2d" , 0.75 )
11591176 n = int (_conf_ticks ("number_of_ticks_2d" , 3 ))
@@ -1166,8 +1183,8 @@ def apply_extent(
11661183 yticks = _round_ticks (_inward_ticks (ymin , ymax , factor , n ))
11671184 ax .set_xticks (xticks )
11681185 ax .set_yticks (yticks )
1169- ax .set_xticklabels (_arcsec_labels (xticks ))
1170- ax .set_yticklabels (_arcsec_labels (yticks ))
1186+ ax .set_xticklabels (_arcsec_labels (xticks , symbol_over_decimal = symbol_over_decimal ))
1187+ ax .set_yticklabels (_arcsec_labels (yticks , symbol_over_decimal = symbol_over_decimal ))
11711188
11721189 # The y-tick labels are rotated 90 degrees elsewhere; without an explicit
11731190 # centre alignment a rotated label anchors at its right edge and visually
0 commit comments