InvalidOpacityError(opacity)
Source¶
Bases: NumdaplotError
Raised when an opacity is 0 or lower, which would draw nothing, greater than 1, or not a number.
Added in version 0.1.0
Parameters:
-
opacity(float)The rejected opacity.
Attributes:
-
opacityThe rejected opacity.
Examples:
import numdaplot as ndp
try:
ndp.ScatterChart(opacity=0.0)
except ndp.InvalidOpacityError as error:
print(error)
# Expected an opacity above 0 and up to 1, got 0.0.