RefusedSettingError(setting_name, owner_name)
Source¶
Bases: NumdaplotError
Raised when a setting is given to an object that does not accept it.
For example, a ScatterChart always draws a marker, and only PNG images have a resolution.
Added in version 0.1.0
Parameters:
-
setting_name(str)The refused setting, such as
MarkerShape.NONE. -
owner_name(str)What refuses it, such as
ScatterChart.
Attributes:
-
setting_nameThe refused setting, such as
MarkerShape.NONE. -
owner_nameWhat refuses it, such as
ScatterChart.
Examples:
import numdaplot as ndp
try:
ndp.ScatterChart(x="surface", y="price", marker=ndp.MarkerShape.NONE)
except ndp.RefusedSettingError as error:
print(error)
# ScatterChart does not accept MarkerShape.NONE.