Function plotters::coord::combinators::make_partial_axis[][src]

pub fn make_partial_axis<T>(
    axis_range: Range<T>,
    part: Range<f64>
) -> Option<PartialAxis<<Range<T> as AsRangedCoord>::CoordDescType>> where
    Range<T>: AsRangedCoord,
    T: NumCast + Clone
Expand description

Make a partial axis based on the percentage of visible portion. We can use into_partial_axis to create a partial axis range specification. But sometimes, we want to directly specify the percentage visible to the user.

  • axis_range: The range specification
  • part: The visible part of the axis. Each value is from [0.0, 1.0]
  • returns: The partial axis created from the input, or None when not possible