MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / transform_data

Method transform_data

src/transform.rs:198–200  ·  view source on GitHub ↗

Convert a data-coordinate value into plot-space. This applies the transform first, then the axis scale. `Transform::axes()` needs the current axis range, which is only available internally during rendering.

(&self, pos: f64, axis_scale: AxisScale)

Source from the content-addressed store, hash-verified

196 /// needs the current axis range, which is only available internally during
197 /// rendering.
198 pub fn transform_data(&self, pos: f64, axis_scale: AxisScale) -> Option<f64> {
199 data_value_to_plot(pos, axis_scale, Some(self))
200 }
201
202 /// Convert a value into a normalized `[0, 1]` position along an axis.
203 ///

Callers 1

transform_positionMethod · 0.80

Calls 1

data_value_to_plotFunction · 0.85

Tested by

no test coverage detected