@@ -276,33 +276,6 @@ def _warn_groups(
276276 _warn_missing_groups (groups , color_source_vector , col_for_color )
277277
278278
279- def _maybe_apply_transfunc (
280- colortype : ColorType ,
281- color_vector : Any ,
282- transfunc : abc .Callable [[Any ], Any ] | None ,
283- ) -> Any :
284- """Apply ``transfunc`` to a continuous ``color_vector``; no-op when categorical/none or unset."""
285- if colortype == "continuous" and transfunc is not None :
286- return transfunc (color_vector )
287- return color_vector
288-
289-
290- def _filter_groups_transparent_na (
291- groups : str | list [str ],
292- color_source_vector : pd .Categorical ,
293- color_vector : pd .Series | np .ndarray | list [str ],
294- ) -> tuple [np .ndarray , pd .Categorical , np .ndarray ]:
295- """Return a boolean mask and filtered color vectors for groups filtering.
296-
297- Used when ``na_color=None`` (fully transparent) so that non-matching
298- elements are removed entirely instead of rendered invisibly.
299- """
300- keep = color_source_vector .isin (groups )
301- filtered_csv = color_source_vector [keep ]
302- filtered_cv = np .asarray (color_vector )[keep ]
303- return keep , filtered_csv , filtered_cv
304-
305-
306279def _split_colorbar_params (
307280 params : dict [str , object ] | None ,
308281) -> tuple [dict [str , object ], dict [str , object ], str | None ]:
0 commit comments