@@ -1635,7 +1635,24 @@ def _fix_contour_edges(self, method, *args, **kwargs):
16351635 kwargs ['colors' ] = kwargs .pop ('edgecolors' , 'k' )
16361636 return self ._plot_native (method , * args , ** kwargs )
16371637
1638- def _fix_patch_edges (self , obj , edgefix = None , ** kwargs ):
1638+ def _fix_sticky_edges (self , objs , axis , * args , only = None ):
1639+ """
1640+ Fix sticky edges for the input artists using the minimum and maximum of the
1641+ input coordinates. This is used to copy `bar` behavior to `area` and `lines`.
1642+ """
1643+ for array in args :
1644+ min_ , max_ = inputs ._safe_range (array )
1645+ if min_ is None or max_ is None :
1646+ continue
1647+ for obj in guides ._iter_iterables (objs ):
1648+ if only and not isinstance (obj , only ):
1649+ continue # e.g. ignore error bars
1650+ convert = getattr (self , 'convert_' + axis + 'units' )
1651+ edges = getattr (obj .sticky_edges , axis )
1652+ edges .extend (convert ((min_ , max_ )))
1653+
1654+ @staticmethod
1655+ def _fix_patch_edges (obj , edgefix = None , ** kwargs ):
16391656 """
16401657 Fix white lines between between filled patches and fix issues
16411658 with colormaps that are transparent. If keyword args passed by user
@@ -1684,26 +1701,10 @@ def _fix_patch_edges(self, obj, edgefix=None, **kwargs):
16841701 obj .set_edgecolor (obj .get_facecolor ())
16851702 elif np .iterable (obj ): # e.g. silent_list of BarContainer
16861703 for element in obj :
1687- self ._fix_patch_edges (element , edgefix = edgefix )
1704+ PlotAxes ._fix_patch_edges (element , edgefix = edgefix )
16881705 else :
16891706 warnings ._warn_proplot (f'Unexpected obj { obj } passed to _fix_patch_edges.' )
16901707
1691- def _fix_sticky_edges (self , objs , axis , * args , only = None ):
1692- """
1693- Fix sticky edges for the input artists using the minimum and maximum of the
1694- input coordinates. This is used to copy `bar` behavior to `area` and `lines`.
1695- """
1696- for array in args :
1697- min_ , max_ = inputs ._safe_range (array )
1698- if min_ is None or max_ is None :
1699- continue
1700- for obj in guides ._iter_iterables (objs ):
1701- if only and not isinstance (obj , only ):
1702- continue # e.g. ignore error bars
1703- convert = getattr (self , 'convert_' + axis + 'units' )
1704- edges = getattr (obj .sticky_edges , axis )
1705- edges .extend (convert ((min_ , max_ )))
1706-
17071708 @contextlib .contextmanager
17081709 def _keep_grid_bools (self ):
17091710 """
0 commit comments