Skip to content

Commit 6f7a23d

Browse files
committed
Fix issue #143
1 parent 68a9e75 commit 6f7a23d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/coord/logarithmic.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ impl<V: LogScalable> Ranged for LogCoord<V> {
8888
}
8989

9090
fn key_points(&self, max_points: usize) -> Vec<Self::ValueType> {
91-
let tier_1 = (self.logic.end.as_f64() / self.logic.start.as_f64())
91+
let mut tier_1 = (self.logic.end.as_f64() / self.logic.start.as_f64())
9292
.log10()
9393
.abs()
94-
.floor() as usize;
94+
.floor()
95+
.max(1.0) as usize;
96+
9597
let tier_2_density = if max_points < tier_1 {
9698
0
9799
} else {

0 commit comments

Comments
 (0)