diff --git a/holoviews/core/util.py b/holoviews/core/util.py index d8cb9c84f2..4cbb101f19 100644 --- a/holoviews/core/util.py +++ b/holoviews/core/util.py @@ -812,9 +812,9 @@ def find_range(values, soft_range=[]): def is_finite(value): """ - Safe check whether a value is finite, only None and NaN values are - considered non-finite and allows checking all types not restricted - to numeric types. + Safe check whether a value is finite, only None, NaN and inf + values are considered non-finite and allows checking all types not + restricted to numeric types. """ if value is None: return False diff --git a/holoviews/plotting/plot.py b/holoviews/plotting/plot.py index 3620109f7f..69c8626105 100644 --- a/holoviews/plotting/plot.py +++ b/holoviews/plotting/plot.py @@ -598,7 +598,10 @@ class GenericElementPlot(DimensionedPlot): If set bgcolor overrides the background color of the axis.""") default_span = param.ClassSelector(default=2.0, class_=(int, float, tuple), doc=""" - Default span if the spans zero range.""") + Defines the span of an axis if the axis range is zero, i.e. if + the lower and upper end of an axis are equal. For example if + there is a single datapoint at 0 a default_span of 2.0 will + result in axis ranges spanning from -1 to 1.""") invert_axes = param.Boolean(default=False, doc=""" Whether to invert the x- and y-axis""") @@ -892,6 +895,23 @@ def get_extents(self, element, ranges, range_type='combined', xdim=None, ydim=No """ Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents. + + The extents are computed by combining the data ranges, extents + and dimension ranges. Each of these can be obtained individually + by setting the range_type to one of: + + * 'data': Just the data ranges + * 'extents': Element.extents + * 'soft': Dimension.soft_range values + * 'hard': Dimension.range values + + To obtain the combined range, which includes range padding the + default may be used: + + * 'combined': All the range types combined and padding applied + + This allows Overlay plots to obtain each range and combine them + appropriately for all the objects in the overlay. """ num = 6 if self.projection == '3d' else 4 if self.apply_extents and range_type in ('combined', 'extents'): @@ -1263,7 +1283,6 @@ def get_extents(self, overlay, ranges, range_type='combined'): if util.is_number(z0) and z0 == z1: z0, z1 = z0-zspan, z1+zspan xpad, ypad, zpad = self.get_padding((x0, y0, z0, x1, y1, z1)) - print('<<<', hard_extents) x0, x1 = util.dimension_range(x0, x1, (hx0, hx1), (sx0, sx1), xpad, self.logx) y0, y1 = util.dimension_range(y0, y1, (hy0, hy1), (sy0, sy1), ypad, self.logy) if len(data_extent) == 6: