Skip to main content

validate_scale_config

Function validate_scale_config 

Source
pub fn validate_scale_config(scale: &Scale, min: Option<f64>, max: Option<f64>)
Expand description

Validate scaling configuration parameters.

Ensures that scale parameters are compatible (e.g., log scale requires positive min value).

§Arguments

  • scale - Data scaling method
  • min - Optional minimum value for scaling range
  • max - Optional maximum value for scaling range

§Panics

Panics with a helpful error message if configuration is invalid:

  • Log scale without explicit –min specified
  • Log scale with min ≤ 0 (logarithm undefined for non-positive values)