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

Function _flatten_visible

pandas/tests/plotting/common.py:327–340  ·  view source on GitHub ↗

Flatten axes, and filter only visible Parameters ---------- axes : matplotlib Axes object, or its list-like

(axes: Axes | Sequence[Axes])

Source from the content-addressed store, hash-verified

325
326
327def _flatten_visible(axes: Axes | Sequence[Axes]) -> Sequence[Axes]:
328 """
329 Flatten axes, and filter only visible
330
331 Parameters
332 ----------
333 axes : matplotlib Axes object, or its list-like
334
335 """
336 from pandas.plotting._matplotlib.tools import flatten_axes
337
338 axes_ndarray = flatten_axes(axes)
339 axes = [ax for ax in axes_ndarray if ax.get_visible()]
340 return axes
341
342
343def _check_has_errorbars(axes, xerr=0, yerr=0):

Callers 8

_check_bar_alignmentMethod · 0.90
_check_legend_labelsFunction · 0.85
_check_ticks_propsFunction · 0.85
_check_ax_scalesFunction · 0.85
_check_axes_shapeFunction · 0.85
_check_has_errorbarsFunction · 0.85
_check_box_return_typeFunction · 0.85

Calls 1

flatten_axesFunction · 0.90

Tested by 1

_check_bar_alignmentMethod · 0.72