Skip to content

Commit

Permalink
Add **kwargs to all get_extents
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Aug 30, 2023
1 parent 6e1f5cc commit 3be44b6
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions holoviews/plotting/mpl/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def get_data(self, element, ranges, style):
pos_error = element.dimension_values(pos_idx)
return (xs, mean-neg_error, mean+pos_error), style, {}

def get_extents(self, element, ranges, range_type='combined'):
def get_extents(self, element, ranges, range_type='combined', **kwargs):
return ChartPlot.get_extents(self, element, ranges, range_type)


Expand Down Expand Up @@ -390,7 +390,7 @@ def _compute_ticks(self, element, edges, widths, lims):
labels = [dim.pprint_value(v) for v in xvals]
return [xvals, labels]

def get_extents(self, element, ranges, range_type='combined'):
def get_extents(self, element, ranges, range_type='combined', **kwargs):
ydim = element.get_dimension(1)
s0, s1 = ranges[ydim.name]['soft']
s0 = min(s0, 0) if isfinite(s0) else 0
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/mpl/heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def _get_ticks(ticks, ticker):
return ticks


def get_extents(self, view, ranges, range_type='combined'):
def get_extents(self, view, ranges, range_type='combined', **kwargs):
if range_type == 'hard':
return (np.nan,)*4
return (0, 0, np.pi*2, self.max_radius+self.radius_outer)
Expand Down
4 changes: 2 additions & 2 deletions holoviews/plotting/mpl/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class RasterBasePlot(ElementPlot):

_plot_methods = dict(single='imshow')

def get_extents(self, element, ranges, range_type='combined'):
def get_extents(self, element, ranges, range_type='combined', **kwargs):
extents = super().get_extents(element, ranges, range_type)
if self.situate_axes or range_type not in ('combined', 'data'):
return extents
Expand Down Expand Up @@ -294,7 +294,7 @@ def __init__(self, layout, keys=None, dimensions=None, create_axes=False, ranges
def _finalize_artist(self, key):
pass

def get_extents(self, view, ranges, range_type='combined'):
def get_extents(self, view, ranges, range_type='combined', **kwargs):
if range_type == 'hard':
return (np.nan,)*4
width, height, _, _, _, _ = self.border_extents
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/mpl/sankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class SankeyPlot(GraphPlot):

style_opts = GraphPlot.style_opts + ['label_text_font_size']

def get_extents(self, element, ranges, range_type='combined'):
def get_extents(self, element, ranges, range_type='combined', **kwargs):
"""
A Chord plot is always drawn on a unit circle.
"""
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ def _get_range_extents(self, element, ranges, range_type, xdim, ydim, zdim):

return (x0, y0, x1, y1)

def get_extents(self, element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None):
def get_extents(self, element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, **kwargs):
"""
Gets the extents for the axes from the current Element. The globally
computed ranges can optionally override the extents.
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/plotly/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _get_axis_dims(self, element):
xdims = element.kdims[0]
return (xdims, element.vdims[0])

def get_extents(self, element, ranges, range_type='combined'):
def get_extents(self, element, ranges, range_type='combined', **kwargs):
x0, y0, x1, y1 = BarsMixin.get_extents(self, element, ranges, range_type)
if range_type not in ('data', 'combined'):
return x0, y0, x1, y1
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/plotly/tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def graph_options(self, element, ranges, style, **kwargs):

return opts

def get_extents(self, element, ranges, range_type='combined'):
def get_extents(self, element, ranges, range_type='combined', **kwargs):
extents = super().get_extents(element, ranges, range_type)
if (not self.overlaid and all(e is None or not np.isfinite(e) for e in extents)
and range_type in ('combined', 'data')):
Expand Down

0 comments on commit 3be44b6

Please sign in to comment.