@@ -100,7 +100,7 @@ def _get_layout(nplots: int, layout=None, layout_type: str = "box") -> Tuple[int
100100# copied from matplotlib/pyplot.py and modified for pandas.plotting
101101
102102
103- def _subplots (
103+ def create_subplots (
104104 naxes : int ,
105105 sharex : bool = False ,
106106 sharey : bool = False ,
@@ -194,7 +194,7 @@ def _subplots(
194194 fig = plt .figure (** fig_kw )
195195 else :
196196 if is_list_like (ax ):
197- ax = _flatten (ax )
197+ ax = flatten_axes (ax )
198198 if layout is not None :
199199 warnings .warn (
200200 "When passing multiple axes, layout keyword is ignored" , UserWarning
@@ -221,7 +221,7 @@ def _subplots(
221221 if squeeze :
222222 return fig , ax
223223 else :
224- return fig , _flatten (ax )
224+ return fig , flatten_axes (ax )
225225 else :
226226 warnings .warn (
227227 "To output multiple subplots, the figure containing "
@@ -264,7 +264,7 @@ def _subplots(
264264 for ax in axarr [naxes :]:
265265 ax .set_visible (False )
266266
267- _handle_shared_axes (axarr , nplots , naxes , nrows , ncols , sharex , sharey )
267+ handle_shared_axes (axarr , nplots , naxes , nrows , ncols , sharex , sharey )
268268
269269 if squeeze :
270270 # Reshape the array to have the final desired dimension (nrow,ncol),
@@ -297,7 +297,7 @@ def _remove_labels_from_axis(axis: "Axis"):
297297 axis .get_label ().set_visible (False )
298298
299299
300- def _handle_shared_axes (
300+ def handle_shared_axes (
301301 axarr : Iterable ["Axes" ],
302302 nplots : int ,
303303 naxes : int ,
@@ -351,15 +351,15 @@ def _handle_shared_axes(
351351 _remove_labels_from_axis (ax .yaxis )
352352
353353
354- def _flatten (axes : Union ["Axes" , Sequence ["Axes" ]]) -> Sequence ["Axes" ]:
354+ def flatten_axes (axes : Union ["Axes" , Sequence ["Axes" ]]) -> Sequence ["Axes" ]:
355355 if not is_list_like (axes ):
356356 return np .array ([axes ])
357357 elif isinstance (axes , (np .ndarray , ABCIndexClass )):
358358 return axes .ravel ()
359359 return np .array (axes )
360360
361361
362- def _set_ticks_props (
362+ def set_ticks_props (
363363 axes : Union ["Axes" , Sequence ["Axes" ]],
364364 xlabelsize = None ,
365365 xrot = None ,
@@ -368,7 +368,7 @@ def _set_ticks_props(
368368):
369369 import matplotlib .pyplot as plt
370370
371- for ax in _flatten (axes ):
371+ for ax in flatten_axes (axes ):
372372 if xlabelsize is not None :
373373 plt .setp (ax .get_xticklabels (), fontsize = xlabelsize )
374374 if xrot is not None :
@@ -380,7 +380,7 @@ def _set_ticks_props(
380380 return axes
381381
382382
383- def _get_all_lines (ax : "Axes" ) -> List ["Line2D" ]:
383+ def get_all_lines (ax : "Axes" ) -> List ["Line2D" ]:
384384 lines = ax .get_lines ()
385385
386386 if hasattr (ax , "right_ax" ):
@@ -392,7 +392,7 @@ def _get_all_lines(ax: "Axes") -> List["Line2D"]:
392392 return lines
393393
394394
395- def _get_xlim (lines : Iterable ["Line2D" ]) -> Tuple [float , float ]:
395+ def get_xlim (lines : Iterable ["Line2D" ]) -> Tuple [float , float ]:
396396 left , right = np .inf , - np .inf
397397 for l in lines :
398398 x = l .get_xdata (orig = False )
0 commit comments