MCPcopy
hub / github.com/pandas-dev/pandas / flatten_axes

Function flatten_axes

pandas/plotting/_matplotlib/tools.py:445–451  ·  view source on GitHub ↗
(axes: Axes | Iterable[Axes])

Source from the content-addressed store, hash-verified

443
444
445def flatten_axes(axes: Axes | Iterable[Axes]) -> Generator[Axes]:
446 if not is_list_like(axes):
447 yield axes # type: ignore[misc]
448 elif isinstance(axes, (np.ndarray, ABCIndex)):
449 yield from np.asarray(axes).reshape(-1)
450 else:
451 yield from axes # type: ignore[misc]
452
453
454def set_ticks_props(

Callers 9

_axes_and_figMethod · 0.90
_grouped_plot_by_columnFunction · 0.90
boxplot_frame_groupbyFunction · 0.90
_grouped_plotFunction · 0.90
hist_frameFunction · 0.90
_check_axes_shapeFunction · 0.90
_flatten_visibleFunction · 0.90
create_subplotsFunction · 0.85
set_ticks_propsFunction · 0.85

Calls 1

reshapeMethod · 0.45

Tested by

no test coverage detected