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

Function _check_ax_scales

pandas/tests/plotting/common.py:265–280  ·  view source on GitHub ↗

Check each axes has expected scales Parameters ---------- axes : matplotlib Axes object, or its list-like xaxis : {'linear', 'log'} expected xaxis scale yaxis : {'linear', 'log'} expected yaxis scale

(axes, xaxis="linear", yaxis="linear")

Source from the content-addressed store, hash-verified

263
264
265def _check_ax_scales(axes, xaxis="linear", yaxis="linear"):
266 """
267 Check each axes has expected scales
268
269 Parameters
270 ----------
271 axes : matplotlib Axes object, or its list-like
272 xaxis : {'linear', 'log'}
273 expected xaxis scale
274 yaxis : {'linear', 'log'}
275 expected yaxis scale
276 """
277 axes = _flatten_visible(axes)
278 for ax in axes:
279 assert ax.xaxis.get_scale() == xaxis
280 assert ax.yaxis.get_scale() == yaxis
281
282
283def _check_axes_shape(axes, axes_num=None, layout=None, figsize=None):

Callers 13

test_plot_scalesMethod · 0.90
test_boxplot_seriesMethod · 0.90
test_hist_kdeMethod · 0.90
test_hist_kde_logyMethod · 0.90
test_hist_kde_colorMethod · 0.90
test_logscalesMethod · 0.90
test_kde_df_logyMethod · 0.90

Calls 1

_flatten_visibleFunction · 0.85

Tested by 13

test_plot_scalesMethod · 0.72
test_boxplot_seriesMethod · 0.72
test_hist_kdeMethod · 0.72
test_hist_kde_logyMethod · 0.72
test_hist_kde_colorMethod · 0.72
test_logscalesMethod · 0.72
test_kde_df_logyMethod · 0.72