Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita212c30

Browse files
authored
Merge pull request#673 from booti386/master
Add ReversibleRanged support for LogCoord.
2 parents5c51eb3 +95cb03b commita212c30

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎plotters/src/coord/ranged1d/combinators/logarithmic.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
usecrate::coord::ranged1d::types::RangedCoordf64;
2-
usecrate::coord::ranged1d::{AsRangedCoord,DefaultFormatting,KeyPointHint,Ranged};
2+
usecrate::coord::ranged1d::{
3+
AsRangedCoord,DefaultFormatting,KeyPointHint,Ranged,ReversibleRanged,
4+
};
35
use std::marker::PhantomData;
46
use std::ops::Range;
57

@@ -78,6 +80,15 @@ impl<T: LogScalable> IntoLogRange for Range<T> {
7880
}
7981
}
8082

83+
impl<V:LogScalable>ReversibleRangedforLogCoord<V>{
84+
fnunmap(&self,input:i32,limit:(i32,i32)) ->Option<V>{
85+
self.linear.unmap(input, limit).map(|value_ln|{
86+
let fv = value_ln.exp();
87+
self.f64_to_value(fv)
88+
})
89+
}
90+
}
91+
8192
/// The logarithmic coordinate decorator.
8293
/// This decorator is used to make the axis rendered as logarithmically.
8394
#[derive(Clone)]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp