remove#

Hist2d.remove(xlower=None, xupper=None, ylower=None, yupper=None, setval=0.0)[source]#

Return a new histogram with bins within the specified (x, y) range set to setval.

Parameters:
xlowerfloat or None

Lower bound of x-axis to remove (inclusive). If None, no lower bound.

xupperfloat or None

Upper bound of x-axis to remove (exclusive). If None, no upper bound.

ylowerfloat or None

Lower bound of y-axis to remove (inclusive). If None, no lower bound.

yupperfloat or None

Upper bound of y-axis to remove (exclusive). If None, no upper bound.

setvalfloat, default 0.0

Value to assign to bins within the removed region.

Returns:
Hist2d

A new histogram with the specified region “removed” (set to setval).