| 1 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/::Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#; |
| 2 | |
| 3 | #[cfg(feature = "color")] |
| 4 | use coloredrust-analyzer cargo colored 3.1.1 crate/::Colorrust-analyzer cargo colored 3.1.1 color/Color#; |
| 5 | #[cfg(feature = "color")] |
| 6 | use coloredrust-analyzer cargo colored 3.1.1 crate/::ColoredStringrust-analyzer cargo colored 3.1.1 ColoredString#; |
| 7 | #[cfg(feature = "color")] |
| 8 | use coloredrust-analyzer cargo colored 3.1.1 crate/::Colorizerust-analyzer cargo colored 3.1.1 Colorize#; |
| 9 | |
| 10 | pub struct Configrust-analyzer cargo rasciigraph 0.3.0 Config# { |
| 11 | widthrust-analyzer cargo rasciigraph 0.3.0 Config#width.: u32, |
| 12 | heightrust-analyzer cargo rasciigraph 0.3.0 Config#height.: u32, |
| 13 | offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.: u32, |
| 14 | captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, |
| 15 | #[cfg(feature = "color")] |
| 16 | caption_colorrust-analyzer cargo rasciigraph 0.3.0 Config#caption_color.: Colorrust-analyzer cargo colored 3.1.1 color/Color#, |
| 17 | #[cfg(feature = "color")] |
| 18 | axis_colorrust-analyzer cargo rasciigraph 0.3.0 Config#axis_color.: Colorrust-analyzer cargo colored 3.1.1 color/Color#, |
| 19 | #[cfg(feature = "color")] |
| 20 | label_colorrust-analyzer cargo rasciigraph 0.3.0 Config#label_color.: Colorrust-analyzer cargo colored 3.1.1 color/Color#, |
| 21 | #[cfg(feature = "color")] |
| 22 | series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Colorrust-analyzer cargo colored 3.1.1 color/Color#>, |
| 23 | #[cfg(feature = "color")] |
| 24 | series_legendsrust-analyzer cargo rasciigraph 0.3.0 Config#series_legends.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 25 | } |
| 26 | |
| 27 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for Configrust-analyzer cargo rasciigraph 0.3.0 Config# { |
| 28 | fn defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().() -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default] { |
| 29 | Configrust-analyzer cargo rasciigraph 0.3.0 Config# { |
| 30 | widthrust-analyzer cargo rasciigraph 0.3.0 Config#width.: 0, |
| 31 | heightrust-analyzer cargo rasciigraph 0.3.0 Config#height.: 0, |
| 32 | offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.: 0, |
| 33 | captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption.: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]new().(), |
| 34 | #[cfg(feature = "color")] |
| 35 | caption_colorrust-analyzer cargo rasciigraph 0.3.0 Config#caption_color.: Colorrust-analyzer cargo colored 3.1.1 color/Color#::Whiterust-analyzer cargo colored 3.1.1 color/Color#White#, |
| 36 | #[cfg(feature = "color")] |
| 37 | axis_colorrust-analyzer cargo rasciigraph 0.3.0 Config#axis_color.: Colorrust-analyzer cargo colored 3.1.1 color/Color#::Whiterust-analyzer cargo colored 3.1.1 color/Color#White#, |
| 38 | #[cfg(feature = "color")] |
| 39 | label_colorrust-analyzer cargo rasciigraph 0.3.0 Config#label_color.: Colorrust-analyzer cargo colored 3.1.1 color/Color#::Whiterust-analyzer cargo colored 3.1.1 color/Color#White#, |
| 40 | #[cfg(feature = "color")] |
| 41 | series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![], |
| 42 | #[cfg(feature = "color")] |
| 43 | series_legendsrust-analyzer cargo rasciigraph 0.3.0 Config#series_legends.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(), |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | impl Configrust-analyzer cargo rasciigraph 0.3.0 Config# { |
| 49 | pub fn with_captionrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_caption().(mut self, caption: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#) -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config] { |
| 50 | self.captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption. = caption; |
| 51 | self |
| 52 | } |
| 53 | |
| 54 | pub fn with_heightrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_height().(mut self, height: u32) -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config] { |
| 55 | self.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height. = height; |
| 56 | self |
| 57 | } |
| 58 | |
| 59 | pub fn with_widthrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_width().(mut self, width: u32) -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config] { |
| 60 | self.widthrust-analyzer cargo rasciigraph 0.3.0 Config#width. = width; |
| 61 | self |
| 62 | } |
| 63 | |
| 64 | pub fn with_offsetrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_offset().(mut self, offset: u32) -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config] { |
| 65 | self.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. = offset; |
| 66 | self |
| 67 | } |
| 68 | |
| 69 | #[cfg(feature = "color")] |
| 70 | pub fn with_caption_colorrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_caption_color().(mut self, color: Colorrust-analyzer cargo colored 3.1.1 color/Color#) -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config] { |
| 71 | self.caption_colorrust-analyzer cargo rasciigraph 0.3.0 Config#caption_color. = color; |
| 72 | self |
| 73 | } |
| 74 | |
| 75 | #[cfg(feature = "color")] |
| 76 | pub fn with_axis_colorrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_axis_color().(mut self, color: Colorrust-analyzer cargo colored 3.1.1 color/Color#) -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config] { |
| 77 | self.axis_colorrust-analyzer cargo rasciigraph 0.3.0 Config#axis_color. = color; |
| 78 | self |
| 79 | } |
| 80 | |
| 81 | #[cfg(feature = "color")] |
| 82 | pub fn with_label_colorrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_label_color().(mut self, color: Colorrust-analyzer cargo colored 3.1.1 color/Color#) -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config] { |
| 83 | self.label_colorrust-analyzer cargo rasciigraph 0.3.0 Config#label_color. = color; |
| 84 | self |
| 85 | } |
| 86 | |
| 87 | #[cfg(feature = "color")] |
| 88 | pub fn with_series_colorsrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_series_colors().(mut self, colors: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Colorrust-analyzer cargo colored 3.1.1 color/Color#>) -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config] { |
| 89 | self.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors. = colors; |
| 90 | self |
| 91 | } |
| 92 | |
| 93 | #[cfg(feature = "color")] |
| 94 | pub fn with_series_legendsrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_series_legends().(mut self, legends: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>) -> Selfrust-analyzer cargo rasciigraph 0.3.0 impl#[Config] { |
| 95 | self.series_legendsrust-analyzer cargo rasciigraph 0.3.0 Config#series_legends. = legends; |
| 96 | self |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | pub fn plotrust-analyzer cargo rasciigraph 0.3.0 plot().(series: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<f64>, config: Configrust-analyzer cargo rasciigraph 0.3.0 Config#) -> Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# { |
| 101 | plot_manyrust-analyzer cargo rasciigraph 0.3.0 plot_many().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![series], config) |
| 102 | } |
| 103 | |
| 104 | pub fn plot_manyrust-analyzer cargo rasciigraph 0.3.0 plot_many().(mut series: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<f64>>, mut config: Configrust-analyzer cargo rasciigraph 0.3.0 Config#) -> Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# { |
| 105 | let mut len_max = series.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|s| s.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().()).maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#max().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(0); |
| 106 | if config.widthrust-analyzer cargo rasciigraph 0.3.0 Config#width. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().0 { |
| 107 | series.iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().().for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`IterMut<'a, T>`][Iterator]for_each().(|s| { |
| 108 | if s.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().len_max { |
| 109 | s.extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN.].repeatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]repeat().(len_max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().s.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().())) |
| 110 | } |
| 111 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s = interpolaterust-analyzer cargo rasciigraph 0.3.0 interpolate().(s, config.widthrust-analyzer cargo rasciigraph 0.3.0 Config#width.); |
| 112 | }); |
| 113 | len_max = config.widthrust-analyzer cargo rasciigraph 0.3.0 Config#width. as usize; |
| 114 | } |
| 115 | |
| 116 | let mut min = f64::MAXrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]MAX.; |
| 117 | let mut max = f64::MINrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]MIN.; |
| 118 | |
| 119 | (min, max) = series.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|s| min_maxrust-analyzer cargo rasciigraph 0.3.0 min_max().(s)).foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/adapters/map/impl#[`Map<I, F>`][Iterator]fold().( |
| 120 | (min, max), |
| 121 | |(current_min, current_max), (next_min, next_max)| { |
| 122 | ( |
| 123 | f64::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]min().(next_min, current_min), |
| 124 | f64::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(next_max, current_max), |
| 125 | ) |
| 126 | }, |
| 127 | ); |
| 128 | |
| 129 | let interval = (max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().min).absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().(); |
| 130 | if config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 131 | if interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().0f64 { |
| 132 | config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height. = 3; |
| 133 | } else if interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().1f64 { |
| 134 | config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height. = |
| 135 | (interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(10i32.powrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]pow().((-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().interval.log10rust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]log10().()).ceilrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]ceil().() as u32))) as u32; |
| 136 | } else { |
| 137 | config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height. = interval as u32; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | if config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 142 | config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. = 3; |
| 143 | } |
| 144 | |
| 145 | let ratio = if interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().0f64 { |
| 146 | f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<u32>`]from().(config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().interval |
| 147 | } else { |
| 148 | 1f64 |
| 149 | }; |
| 150 | |
| 151 | let min2 = (min rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().(); |
| 152 | let max2 = (max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().(); |
| 153 | |
| 154 | let int_min2 = min2 as i32; |
| 155 | let int_max2 = max2 as i32; |
| 156 | |
| 157 | let rows = f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_max2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().int_min2).absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().() as i32; |
| 158 | let width = len_max as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.; |
| 159 | |
| 160 | let mut plot: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>> = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(); |
| 161 | |
| 162 | for _i in 0..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#rows { |
| 163 | let mut line = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(); |
| 164 | for _j in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#width { |
| 165 | line.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(" ".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()); |
| 166 | } |
| 167 | plot.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(line); |
| 168 | } |
| 169 | |
| 170 | let mut precision = 2; |
| 171 | let log_maximum = if min rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().0f64 && max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().0f64 { |
| 172 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1f64 |
| 173 | } else { |
| 174 | f64::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(max.absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().(), min.absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().()).log10rust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]log10().() |
| 175 | }; |
| 176 | |
| 177 | if log_maximum rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().0f64 { |
| 178 | if log_maximum rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().1f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().0f64 { |
| 179 | precision rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().log_maximum.absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().() as i32; |
| 180 | } else { |
| 181 | precision rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().(log_maximum.absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().1f64) as i32; |
| 182 | } |
| 183 | } else if log_maximum rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().2f64 { |
| 184 | precision = 0; |
| 185 | } |
| 186 | |
| 187 | let max_number_label_length = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{:.*}", precision as usize, max).lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().(); |
| 188 | let min_number_label_length = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{:.*}", precision as usize, min).lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().(); |
| 189 | |
| 190 | let max_label_width = usize::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#max().(max_number_label_length, min_number_label_length); |
| 191 | |
| 192 | for y in int_min2..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#int_max2 { |
| 193 | let magnitude = if rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().0 { |
| 194 | max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().int_min2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(rows) |
| 195 | } else { |
| 196 | f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y) |
| 197 | }; |
| 198 | let label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!( |
| 199 | "{number:LW$.PREC$}", |
| 200 | LW = max_label_width +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). 1, |
| 201 | PREC = precision as usize, |
| 202 | number = magnitude |
| 203 | ); |
| 204 | let w = (y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().int_min2) as usize; |
| 205 | let h = f64::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<u32>`]from().(config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().label.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().() as f64, 0f64) as usize; |
| 206 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().w]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().h]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = label; |
| 207 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().w]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = "┤".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 208 | } |
| 209 | |
| 210 | for series_inner in series { |
| 211 | let mut y0; |
| 212 | let mut y1; |
| 213 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().0]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() { |
| 214 | y0 = ((series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().0]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().min2) as i32; |
| 215 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = "┼".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 216 | } |
| 217 | |
| 218 | for x in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#series_inner.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1 { |
| 219 | if series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() && series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() { |
| 220 | continue; |
| 221 | } |
| 222 | if series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() { |
| 223 | y0 = ((series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_min2)) as i32; |
| 224 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = "─".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 225 | continue; |
| 226 | } |
| 227 | if series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() { |
| 228 | y1 = ((series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_min2)) as i32; |
| 229 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = "─".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 230 | continue; |
| 231 | } |
| 232 | y0 = ((series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_min2)) as i32; |
| 233 | y1 = ((series_inner[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_min2)) as i32; |
| 234 | |
| 235 | if y0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().y1 { |
| 236 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = "─".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 237 | } else { |
| 238 | if y0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().y1 { |
| 239 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 240 | "╰".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 241 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 242 | "╮".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 243 | } else { |
| 244 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 245 | "╭".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 246 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 247 | "╯".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 248 | } |
| 249 | |
| 250 | let start = f64::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]min().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y0), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y1)) as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 251 | let end = f64::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y0), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y1)) as i32; |
| 252 | |
| 253 | for y in start..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#end { |
| 254 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 255 | "│".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 256 | } |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | let mut res: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# = plot |
| 262 | .into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().() |
| 263 | .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|line| line.joinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]join().("")) |
| 264 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>() |
| 265 | .joinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]join().("\n"); |
| 266 | res.poprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]pop().(); |
| 267 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().config.captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]is_empty().() { |
| 268 | res.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push().('\n'); |
| 269 | res.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().( |
| 270 | stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::repeatrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/repeat/repeat().(" ") |
| 271 | .takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().max_label_width as usize) |
| 272 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>() |
| 273 | .as_refrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`AsRef<str>`]as_ref().(), |
| 274 | ); |
| 275 | if config.captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().len_max { |
| 276 | res.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().( |
| 277 | stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::repeatrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/repeat/repeat().(" ") |
| 278 | .takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().((len_max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().config.captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().2) |
| 279 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>() |
| 280 | .as_refrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`AsRef<str>`]as_ref().(), |
| 281 | ); |
| 282 | } |
| 283 | res.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().(config.captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption..as_refrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`AsRef<str>`]as_ref().()); |
| 284 | } |
| 285 | res |
| 286 | } |
| 287 | |
| 288 | #[cfg(feature = "color")] |
| 289 | fn create_legend_itemrust-analyzer cargo rasciigraph 0.3.0 create_legend_item().(text: &str, color: coloredrust-analyzer cargo colored 3.1.1 crate/::Colorrust-analyzer cargo colored 3.1.1 color/Color#) -> (Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, usize) { |
| 290 | use coloredrust-analyzer cargo colored 3.1.1 crate/::Colorizerust-analyzer cargo colored 3.1.1 Colorize#; |
| 291 | |
| 292 | let colored_box = "■".colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(color).to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); // Colored box |
| 293 | let default_color = "".normalrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]normal().().to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); // Reset to default color |
| 294 | let legend_item = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{}{} {}", colored_box, default_color, text); |
| 295 | |
| 296 | // Calculate the length of the legend item (accounting for the box and space) |
| 297 | let legend_length = text.charsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]chars().().countrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/iter/impl#[`Chars<'a>`][Iterator]count().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().2; // 2 for the box and space |
| 298 | |
| 299 | (legend_item, legend_length) |
| 300 | } |
| 301 | |
| 302 | #[cfg(feature = "color")] |
| 303 | fn add_legendsrust-analyzer cargo rasciigraph 0.3.0 add_legends().(lines: &mut Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, config: &Configrust-analyzer cargo rasciigraph 0.3.0 Config#, len_max: usize, left_pad: usize) { |
| 304 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/; |
| 305 | |
| 306 | lines.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().("\n\n"); |
| 307 | lines.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().(&iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::repeatrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/repeat/repeat().(" ").takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(left_pad).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>()); |
| 308 | |
| 309 | let mut legends_text = Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]new().(); |
| 310 | let mut legends_text_len = 0; |
| 311 | let right_pad = 3; |
| 312 | |
| 313 | for (i, text) in config.series_legendsrust-analyzer cargo rasciigraph 0.3.0 Config#series_legends..iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 314 | let (item, item_len) = create_legend_itemrust-analyzer cargo rasciigraph 0.3.0 create_legend_item().(text, config.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().); |
| 315 | legends_text.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().(&item); |
| 316 | legends_text_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().item_len; |
| 317 | |
| 318 | if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().config.series_legendsrust-analyzer cargo rasciigraph 0.3.0 Config#series_legends..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1 { |
| 319 | legends_text.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().(&iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::repeatrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/repeat/repeat().(" ").takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(right_pad).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>()); |
| 320 | legends_text_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().right_pad; |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | if legends_text_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().len_max { |
| 325 | lines.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().( |
| 326 | &iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::repeatrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/repeat/repeat().(" ") |
| 327 | .takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().((len_max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().legends_text_len) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().2) |
| 328 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>(), |
| 329 | ); |
| 330 | } |
| 331 | |
| 332 | lines.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().(&legends_text); |
| 333 | } |
| 334 | |
| 335 | #[cfg(feature = "color")] |
| 336 | pub fn plot_coloredrust-analyzer cargo rasciigraph 0.3.0 plot_colored().(series: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<f64>, config: Configrust-analyzer cargo rasciigraph 0.3.0 Config#) -> ColoredStringrust-analyzer cargo colored 3.1.1 ColoredString# { |
| 337 | plot_many_coloredrust-analyzer cargo rasciigraph 0.3.0 plot_many_colored().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![series], config) |
| 338 | } |
| 339 | |
| 340 | #[cfg(feature = "color")] |
| 341 | pub fn plot_many_coloredrust-analyzer cargo rasciigraph 0.3.0 plot_many_colored().(mut series: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<f64>>, mut config: Configrust-analyzer cargo rasciigraph 0.3.0 Config#) -> ColoredStringrust-analyzer cargo colored 3.1.1 ColoredString# { |
| 342 | let mut len_max = series.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|s| s.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().()).maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#max().().unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(0); |
| 343 | if config.widthrust-analyzer cargo rasciigraph 0.3.0 Config#width. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialOrd<Self>`]gt().0 { |
| 344 | series.iter_mutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter_mut().().for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`IterMut<'a, T>`][Iterator]for_each().(|s| { |
| 345 | if s.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().len_max { |
| 346 | s.extendrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Extend<T>`]extend().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN.].repeatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]repeat().(len_max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().s.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().())) |
| 347 | } |
| 348 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().s = interpolaterust-analyzer cargo rasciigraph 0.3.0 interpolate().(s, config.widthrust-analyzer cargo rasciigraph 0.3.0 Config#width.); |
| 349 | }); |
| 350 | len_max = config.widthrust-analyzer cargo rasciigraph 0.3.0 Config#width. as usize; |
| 351 | } |
| 352 | |
| 353 | let mut min = f64::MAXrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]MAX.; |
| 354 | let mut max = f64::MINrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]MIN.; |
| 355 | |
| 356 | (min, max) = series.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|s| min_maxrust-analyzer cargo rasciigraph 0.3.0 min_max().(s)).foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/adapters/map/impl#[`Map<I, F>`][Iterator]fold().( |
| 357 | (min, max), |
| 358 | |(current_min, current_max), (next_min, next_max)| { |
| 359 | ( |
| 360 | f64::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]min().(next_min, current_min), |
| 361 | f64::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(next_max, current_max), |
| 362 | ) |
| 363 | }, |
| 364 | ); |
| 365 | |
| 366 | let interval = (max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().min).absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().(); |
| 367 | if config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 368 | if interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().0f64 { |
| 369 | config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height. = 3; |
| 370 | } else if interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().1f64 { |
| 371 | config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height. = |
| 372 | (interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(10i32.powrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]pow().((-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().interval.log10rust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]log10().()).ceilrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]ceil().() as u32))) as u32; |
| 373 | } else { |
| 374 | config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height. = interval as u32; |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | if config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0 { |
| 379 | config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. = 3; |
| 380 | } |
| 381 | |
| 382 | let ratio = if interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().0f64 { |
| 383 | f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<u32>`]from().(config.heightrust-analyzer cargo rasciigraph 0.3.0 Config#height.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().interval |
| 384 | } else { |
| 385 | 1f64 |
| 386 | }; |
| 387 | |
| 388 | let min2 = (min rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().(); |
| 389 | let max2 = (max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().(); |
| 390 | |
| 391 | let int_min2 = min2 as i32; |
| 392 | let int_max2 = max2 as i32; |
| 393 | |
| 394 | let rows = f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_max2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().int_min2).absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().() as i32; |
| 395 | let width = len_max as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.; |
| 396 | |
| 397 | let mut plot: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<ColoredStringrust-analyzer cargo colored 3.1.1 ColoredString#>> = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(); |
| 398 | |
| 399 | for _i in 0..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#rows { |
| 400 | let mut line = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::<ColoredStringrust-analyzer cargo colored 3.1.1 ColoredString#>::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(); |
| 401 | for _j in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#width { |
| 402 | line.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(" ".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()); |
| 403 | } |
| 404 | plot.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(line); |
| 405 | } |
| 406 | |
| 407 | let mut precision = 2; |
| 408 | let log_maximum = if min rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().0f64 && max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().0f64 { |
| 409 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1f64 |
| 410 | } else { |
| 411 | f64::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(max.absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().(), min.absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().()).log10rust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]log10().() |
| 412 | }; |
| 413 | |
| 414 | if log_maximum rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().0f64 { |
| 415 | if log_maximum rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().1f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().0f64 { |
| 416 | precision rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().log_maximum.absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().() as i32; |
| 417 | } else { |
| 418 | precision rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().(log_maximum.absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]abs().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().1f64) as i32; |
| 419 | } |
| 420 | } else if log_maximum rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().2f64 { |
| 421 | precision = 0; |
| 422 | } |
| 423 | |
| 424 | let max_number_label_length = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{:.*}", precision as usize, max).lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().(); |
| 425 | let min_number_label_length = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{:.*}", precision as usize, min).lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().(); |
| 426 | |
| 427 | let max_label_width = usize::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#max().(max_number_label_length, min_number_label_length); |
| 428 | |
| 429 | for y in int_min2..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#int_max2 { |
| 430 | let magnitude = if rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().0 { |
| 431 | max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().int_min2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().interval rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(rows) |
| 432 | } else { |
| 433 | f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y) |
| 434 | }; |
| 435 | let label = formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!( |
| 436 | "{number:LW$.PREC$}", |
| 437 | LW = max_label_width +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). 1, |
| 438 | PREC = precision as usize, |
| 439 | number = magnitude |
| 440 | ); |
| 441 | let w = (y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().int_min2) as usize; |
| 442 | let h = f64::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<u32>`]from().(config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().label.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().() as f64, 0f64) as usize; |
| 443 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().w]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().h]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = label.colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.axis_colorrust-analyzer cargo rasciigraph 0.3.0 Config#axis_color.); |
| 444 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().w]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = "┤".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.axis_colorrust-analyzer cargo rasciigraph 0.3.0 Config#axis_color.); |
| 445 | } |
| 446 | |
| 447 | for (i, series_inner) in series.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() { |
| 448 | let mut y0; |
| 449 | let mut y1; |
| 450 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() { |
| 451 | y0 = ((series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().min2) as i32; |
| 452 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 453 | "┼".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.axis_colorrust-analyzer cargo rasciigraph 0.3.0 Config#axis_color.); |
| 454 | } |
| 455 | |
| 456 | for x in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#series_inner.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1 { |
| 457 | if series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() && series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() { |
| 458 | continue; |
| 459 | } |
| 460 | if series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() { |
| 461 | y0 = ((series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_min2)) as i32; |
| 462 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 463 | "─".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().); |
| 464 | continue; |
| 465 | } |
| 466 | if series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() { |
| 467 | y1 = ((series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_min2)) as i32; |
| 468 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 469 | "─".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().); |
| 470 | continue; |
| 471 | } |
| 472 | y0 = ((series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_min2)) as i32; |
| 473 | y1 = ((series_inner[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().ratio).roundrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]round().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(int_min2)) as i32; |
| 474 | |
| 475 | if y0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().y1 { |
| 476 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 477 | "─".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().); |
| 478 | } else { |
| 479 | if y0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().y1 { |
| 480 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 481 | "╰".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().); |
| 482 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 483 | "╮".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().); |
| 484 | } else { |
| 485 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y1) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 486 | "╭".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().); |
| 487 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y0) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 488 | "╯".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().); |
| 489 | } |
| 490 | |
| 491 | let start = f64::minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]min().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y0), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y1)) as i32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().1; |
| 492 | let end = f64::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y0), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(y1)) as i32; |
| 493 | |
| 494 | for y in start..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#end { |
| 495 | plot[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(rows rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().y) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut().(x as u32 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Add<Self>`]add().config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset.) as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`IndexMut<I>`]index_mut(). = |
| 496 | "│".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.series_colorsrust-analyzer cargo rasciigraph 0.3.0 Config#series_colors.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().i]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().); |
| 497 | } |
| 498 | } |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | let mut res: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String# = plot |
| 503 | .into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().() |
| 504 | .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|line| line.into_iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][IntoIterator]into_iter().().maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#map().(|s| s.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()).collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>()) |
| 505 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>>() |
| 506 | .joinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]join().("\n"); |
| 507 | |
| 508 | //res.pop(); |
| 509 | |
| 510 | let mut caption = Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]new().(); |
| 511 | |
| 512 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().config.captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]is_empty().() { |
| 513 | caption.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push().('\n'); |
| 514 | caption.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().( |
| 515 | stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::repeatrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/repeat/repeat().(" ") |
| 516 | .takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().(config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().max_label_width as usize) |
| 517 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>() |
| 518 | .as_refrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`AsRef<str>`]as_ref().(), |
| 519 | ); |
| 520 | if config.captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().len_max { |
| 521 | caption.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().( |
| 522 | stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::repeatrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/sources/repeat/repeat().(" ") |
| 523 | .takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#take().((len_max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().config.captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]len().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Div<Self>`]div().2) |
| 524 | .collectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#collect().::<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>() |
| 525 | .as_refrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`AsRef<str>`]as_ref().(), |
| 526 | ); |
| 527 | } |
| 528 | caption.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().( |
| 529 | config |
| 530 | .captionrust-analyzer cargo rasciigraph 0.3.0 Config#caption. |
| 531 | .colorrust-analyzer cargo colored 3.1.1 impl#[`&str`][Colorize]color().(config.caption_colorrust-analyzer cargo rasciigraph 0.3.0 Config#caption_color.) |
| 532 | .to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().() |
| 533 | .as_refrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`AsRef<str>`]as_ref().(), |
| 534 | ); |
| 535 | } |
| 536 | res.push_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]push_str().(caption.as_refrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`AsRef<str>`]as_ref().()); |
| 537 | |
| 538 | if config.series_legendsrust-analyzer cargo rasciigraph 0.3.0 Config#series_legends..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().0 { |
| 539 | add_legendsrust-analyzer cargo rasciigraph 0.3.0 add_legends().( |
| 540 | &mut res, |
| 541 | &config, |
| 542 | len_max, |
| 543 | config.offsetrust-analyzer cargo rasciigraph 0.3.0 Config#offset. as usize rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().max_label_width, |
| 544 | ) |
| 545 | } |
| 546 | res.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 547 | } |
| 548 | |
| 549 | fn interpolaterust-analyzer cargo rasciigraph 0.3.0 interpolate().(series: &[f64], count: u32) -> Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<f64> { |
| 550 | let mut result = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(); |
| 551 | let spring_factor = (series.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1) as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<u32>`]from().(count rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1); |
| 552 | result.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(series[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().); |
| 553 | for i in 1..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#count rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Sub<Self>`]sub().1 { |
| 554 | let spring = f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<u32>`]from().(i) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().spring_factor; |
| 555 | let before = spring.floorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]floor().(); |
| 556 | let after = spring.ceilrust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/impl#[f64]ceil().(); |
| 557 | let at_point = spring rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().before; |
| 558 | result.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(linear_interpolaterust-analyzer cargo rasciigraph 0.3.0 linear_interpolate().( |
| 559 | series[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().before as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., |
| 560 | series[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().after as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., |
| 561 | at_point, |
| 562 | )) |
| 563 | } |
| 564 | result.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(series[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().series.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().); |
| 565 | result |
| 566 | } |
| 567 | |
| 568 | fn linear_interpolaterust-analyzer cargo rasciigraph 0.3.0 linear_interpolate().(before: f64, after: f64, at_point: f64) -> f64 { |
| 569 | before rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(after rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().before) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().at_point |
| 570 | } |
| 571 | |
| 572 | fn min_maxrust-analyzer cargo rasciigraph 0.3.0 min_max().(series: &[f64]) -> (f64, f64) { |
| 573 | let min = series |
| 574 | .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() |
| 575 | .foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]fold().(stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::f64rust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/::MAXrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/MAX., |accu, &x| if x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().accu { x } else { accu }); |
| 576 | let max = series |
| 577 | .iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().() |
| 578 | .foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/iter/impl#[`Iter<'a, T>`][Iterator]fold().(stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::f64rust-analyzer cargo std https://github.com/rust-lang/rust/library/std f64/::MINrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/MIN., |accu, &x| if x rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().accu { x } else { accu }); |
| 579 | (min, max) |
| 580 | } |
| 581 | |
| 582 | #[cfg(test)] |
| 583 | #[rustfmt::skip] |
| 584 | mod testsrust-analyzer cargo rasciigraph 0.3.0 tests/ { |
| 585 | |
| 586 | macro_rules! graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq! { |
| 587 | ($fname:ident ? [$($series:expr),*] => $rhs:expr) => { |
| 588 | #[test] |
| 589 | fn $fname(){ |
| 590 | let res = crate::plot(vec![$(f64::from($series),)*], crate::Config::default()); |
| 591 | assert_eq!(res, $rhs); |
| 592 | }}; |
| 593 | ($fname:ident ? [$($series:expr),*] ? $config:expr => $rhs:expr) => { |
| 594 | #[test] |
| 595 | fn $fname(){ |
| 596 | let res = crate::plot(vec![$(f64::from($series),)*], $config); |
| 597 | assert_eq!(res, $rhs); |
| 598 | }}; |
| 599 | } |
| 600 | |
| 601 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_onesrust-analyzer cargo rasciigraph 0.3.0 tests/test_ones(). ? [1, 1, 1, 1, 1] => " 1.00 ┼────"); |
| 602 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_zerosrust-analyzer cargo rasciigraph 0.3.0 tests/test_zeros(). ? [0, 0, 0, 0, 0] => " 0.00 ┼────"); |
| 603 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_threerust-analyzer cargo rasciigraph 0.3.0 tests/test_three(). ? [2, 1, 1, 2, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().2, 5, 7, 11, 3, 7, 1] => " 11.00 ┤ ╭╮ |
| 604 | 10.00 ┤ ││ |
| 605 | 9.00 ┤ ││ |
| 606 | 8.00 ┤ ││ |
| 607 | 7.00 ┤ ╭╯│╭╮ |
| 608 | 6.00 ┤ │ │││ |
| 609 | 5.00 ┤ ╭╯ │││ |
| 610 | 4.00 ┤ │ │││ |
| 611 | 3.00 ┤ │ ╰╯│ |
| 612 | 2.00 ┼╮ ╭╮│ │ |
| 613 | 1.00 ┤╰─╯││ ╰ |
| 614 | 0.00 ┤ ││ |
| 615 | -1.00 ┤ ││ |
| 616 | -2.00 ┤ ╰╯ "); |
| 617 | |
| 618 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_fourrust-analyzer cargo rasciigraph 0.3.0 tests/test_four(). ? [2, 1, 1, 2, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().2, 5, 7, 11, 3, 7, 4, 5, 6, 9, 4, 0, 6, 1, 5, 3, 6, 2] ? |
| 619 | craterust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().().with_captionrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_caption().("Plot using asciigraph.".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()) |
| 620 | => " 11.00 ┤ ╭╮ |
| 621 | 10.00 ┤ ││ |
| 622 | 9.00 ┤ ││ ╭╮ |
| 623 | 8.00 ┤ ││ ││ |
| 624 | 7.00 ┤ ╭╯│╭╮ ││ |
| 625 | 6.00 ┤ │ │││ ╭╯│ ╭╮ ╭╮ |
| 626 | 5.00 ┤ ╭╯ │││╭╯ │ ││╭╮││ |
| 627 | 4.00 ┤ │ ││╰╯ ╰╮││││││ |
| 628 | 3.00 ┤ │ ╰╯ ││││╰╯│ |
| 629 | 2.00 ┼╮ ╭╮│ ││││ ╰ |
| 630 | 1.00 ┤╰─╯││ ││╰╯ |
| 631 | 0.00 ┤ ││ ╰╯ |
| 632 | -1.00 ┤ ││ |
| 633 | -2.00 ┤ ╰╯ |
| 634 | Plot using asciigraph."); |
| 635 | |
| 636 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_fiverust-analyzer cargo rasciigraph 0.3.0 tests/test_five(). ? [ 2, 1, 1, 2, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().2, 5, 7, 11, 3, 7, 4, 5, 6, 9, 4, 0, 6, 1, 5, 3, 6, 2] ? |
| 637 | craterust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().().with_captionrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_caption().("Plot using asciigraph.".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()) |
| 638 | => " 11.00 ┤ ╭╮ |
| 639 | 10.00 ┤ ││ |
| 640 | 9.00 ┤ ││ ╭╮ |
| 641 | 8.00 ┤ ││ ││ |
| 642 | 7.00 ┤ ╭╯│╭╮ ││ |
| 643 | 6.00 ┤ │ │││ ╭╯│ ╭╮ ╭╮ |
| 644 | 5.00 ┤ ╭╯ │││╭╯ │ ││╭╮││ |
| 645 | 4.00 ┤ │ ││╰╯ ╰╮││││││ |
| 646 | 3.00 ┤ │ ╰╯ ││││╰╯│ |
| 647 | 2.00 ┼╮ ╭╮│ ││││ ╰ |
| 648 | 1.00 ┤╰─╯││ ││╰╯ |
| 649 | 0.00 ┤ ││ ╰╯ |
| 650 | -1.00 ┤ ││ |
| 651 | -2.00 ┤ ╰╯ |
| 652 | Plot using asciigraph." ); |
| 653 | |
| 654 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_sixrust-analyzer cargo rasciigraph 0.3.0 tests/test_six(). ? [0.2, 0.1, 0.2, 2, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().0.9, 0.7, 0.91, 0.3, 0.7, 0.4, 0.5] ? |
| 655 | craterust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().().with_captionrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_caption().("Plot using asciigraph.".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()) |
| 656 | => " 2.00 ┤ ╭╮ ╭╮ |
| 657 | 0.55 ┼──╯│╭╯╰─── |
| 658 | -0.90 ┤ ╰╯ |
| 659 | Plot using asciigraph." ); |
| 660 | |
| 661 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_sevenrust-analyzer cargo rasciigraph 0.3.0 tests/test_seven(). ? [2, 1, 1, 2, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().2, 5, 7, 11, 3, 7, 1] ? |
| 662 | craterust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().().with_heightrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_height().(4).with_offsetrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_offset().(3) |
| 663 | => " 11.00 ┤ ╭╮ |
| 664 | 7.75 ┤ ╭─╯│╭╮ |
| 665 | 4.50 ┼╮ ╭╮│ ╰╯│ |
| 666 | 1.25 ┤╰─╯││ ╰ |
| 667 | -2.00 ┤ ╰╯ " |
| 668 | ); |
| 669 | |
| 670 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_eightrust-analyzer cargo rasciigraph 0.3.0 tests/test_eight(). ? [0.453, 0.141, 0.951, 0.251, 0.223, 0.581, 0.771, 0.191, 0.393, 0.617, 0.478] |
| 671 | => " 0.95 ┤ ╭╮ |
| 672 | 0.85 ┤ ││ ╭╮ |
| 673 | 0.75 ┤ ││ ││ |
| 674 | 0.65 ┤ ││ ╭╯│ ╭╮ |
| 675 | 0.55 ┤ ││ │ │ │╰ |
| 676 | 0.44 ┼╮││ │ │╭╯ |
| 677 | 0.34 ┤│││ │ ││ |
| 678 | 0.24 ┤││╰─╯ ╰╯ |
| 679 | 0.14 ┤╰╯ "); |
| 680 | |
| 681 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_ninerust-analyzer cargo rasciigraph 0.3.0 tests/test_nine(). ? [0.01, 0.004, 0.003, 0.0042, 0.0083, 0.0033, 0.0079] |
| 682 | => " 0.010 ┼╮ |
| 683 | 0.009 ┤│ |
| 684 | 0.008 ┤│ ╭╮╭ |
| 685 | 0.007 ┤│ │││ |
| 686 | 0.006 ┤│ │││ |
| 687 | 0.005 ┤│ │││ |
| 688 | 0.004 ┤╰╮╭╯││ |
| 689 | 0.003 ┤ ╰╯ ╰╯" |
| 690 | ); |
| 691 | |
| 692 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_tenrust-analyzer cargo rasciigraph 0.3.0 tests/test_ten(). ? [192, 431, 112, 449, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().122, 375, 782, 123, 911, 1711, 172] ? craterust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().().with_heightrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_height().(10) |
| 693 | => " 1711 ┤ ╭╮ |
| 694 | 1528 ┤ ││ |
| 695 | 1344 ┤ ││ |
| 696 | 1161 ┤ ││ |
| 697 | 978 ┤ ╭╯│ |
| 698 | 794 ┤ ╭╮│ │ |
| 699 | 611 ┤ │││ │ |
| 700 | 428 ┤╭╮╭╮╭╯││ │ |
| 701 | 245 ┼╯╰╯││ ╰╯ ╰ |
| 702 | 61 ┤ ││ |
| 703 | -122 ┤ ╰╯ "); |
| 704 | |
| 705 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_elevenrust-analyzer cargo rasciigraph 0.3.0 tests/test_eleven(). ? [0.3189989805, 0.149949026, 0.30142492354, 0.195129182935, 0.3142492354, |
| 706 | 0.1674974513, 0.3142492354, 0.1474974513, 0.3047974513] ? |
| 707 | craterust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().().with_widthrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_width().(30).with_heightrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_height().(5).with_captionrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_caption().("Plot with custom height & width.".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()) |
| 708 | => " 0.32 ┼╮ ╭─╮ ╭╮ ╭ |
| 709 | 0.29 ┤╰╮ ╭─╮ ╭╯ │ ╭╯│ │ |
| 710 | 0.26 ┤ │ ╭╯ ╰╮ ╭╯ ╰╮ ╭╯ ╰╮ ╭╯ |
| 711 | 0.23 ┤ ╰╮ ╭╯ ╰╮│ ╰╮╭╯ ╰╮ ╭╯ |
| 712 | 0.20 ┤ ╰╮│ ╰╯ ╰╯ │╭╯ |
| 713 | 0.16 ┤ ╰╯ ╰╯ |
| 714 | Plot with custom height & width." |
| 715 | ); |
| 716 | |
| 717 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_twelverust-analyzer cargo rasciigraph 0.3.0 tests/test_twelve(). ? [0, 0, 0, 0, 1.5, 0, 0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().0.5, 9, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().3, 0, 0, 1, 2, 1, 0, 0, 0, 0, |
| 718 | 0, 0, 0, 0, 1.5, 0, 0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().0.5, 8, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().3, 0, 0, 1, 2, 1, 0, 0, 0, 0, |
| 719 | 0, 0, 0, 0, 1.5, 0, 0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().0.5, 10, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().3, 0, 0, 1, 2, 1, 0, 0, 0, 0] ? |
| 720 | craterust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().().with_offsetrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_offset().(10).with_heightrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_height().(10).with_captionrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_caption().("I'm a doctor, not an engineer.".to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()) |
| 721 | => " 10.00 ┤ ╭╮ |
| 722 | 8.70 ┤ ╭╮ ││ |
| 723 | 7.40 ┤ ││ ╭╮ ││ |
| 724 | 6.10 ┤ ││ ││ ││ |
| 725 | 4.80 ┤ ││ ││ ││ |
| 726 | 3.50 ┤ ││ ││ ││ |
| 727 | 2.20 ┤ ││ ╭╮ ││ ╭╮ ││ ╭╮ |
| 728 | 0.90 ┤ ╭╮ ││ ╭╯╰╮ ╭╮ ││ ╭╯╰╮ ╭╮ ││ ╭╯╰╮ |
| 729 | -0.40 ┼───╯╰──╯│╭─╯ ╰───────╯╰──╯│╭─╯ ╰───────╯╰──╯│╭─╯ ╰─── |
| 730 | -1.70 ┤ ││ ││ ││ |
| 731 | -3.00 ┤ ╰╯ ╰╯ ╰╯ |
| 732 | I'm a doctor, not an engineer."); |
| 733 | |
| 734 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_thirteenrust-analyzer cargo rasciigraph 0.3.0 tests/test_thirteen(). ? [-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().5, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().2, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().3, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().4, 0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().5, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().6, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().7, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().8, 0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().9, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().3, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().5, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().2, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().9, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().3, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().1] |
| 735 | => " 0.00 ┤ ╭╮ ╭╮ |
| 736 | -1.00 ┤ ││ ││ ╭ |
| 737 | -2.00 ┤╭╮ ││ ││ ╭╮ │ |
| 738 | -3.00 ┤│╰╮││ ││╭╮││╭╯ |
| 739 | -4.00 ┤│ ╰╯│ │││││││ |
| 740 | -5.00 ┼╯ ╰╮ │││╰╯││ |
| 741 | -6.00 ┤ ╰╮ │││ ││ |
| 742 | -7.00 ┤ ╰╮│││ ││ |
| 743 | -8.00 ┤ ╰╯││ ││ |
| 744 | -9.00 ┤ ╰╯ ╰╯ "); |
| 745 | |
| 746 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_fourteenrust-analyzer cargo rasciigraph 0.3.0 tests/test_fourteen(). ? [-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().0.000018527, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().0.021, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().0.00123, 0.00000021312, |
| 747 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().0.0434321234, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().0.032413241234, 0.0000234234] ? |
| 748 | craterust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().().with_heightrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_height().(5).with_widthrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_width().(45) |
| 749 | => " 0.000 ┼─╮ ╭────────╮ ╭ |
| 750 | -0.008 ┤ ╰──╮ ╭──╯ ╰─╮ ╭─╯ |
| 751 | -0.017 ┤ ╰─────╯ ╰╮ ╭─╯ |
| 752 | -0.025 ┤ ╰─╮ ╭─╯ |
| 753 | -0.034 ┤ ╰╮ ╭────╯ |
| 754 | -0.042 ┤ ╰───╯ " |
| 755 | ); |
| 756 | |
| 757 | graph_eqrust-analyzer cargo rasciigraph 0.3.0 tests/graph_eq!!(test_fifteenrust-analyzer cargo rasciigraph 0.3.0 tests/test_fifteen(). ? [57.76, 54.04, 56.31, 57.02, 59.5, 52.63, 52.97, 56.44, 56.75, 52.96, 55.54, |
| 758 | 55.09, 58.22, 56.85, 60.61, 59.62, 59.73, 59.93, 56.3, 54.69, 55.32, 54.03, 50.98, 50.48, 54.55, 47.49, |
| 759 | 55.3, 46.74, 46, 45.8, 49.6, 48.83, 47.64, 46.61, 54.72, 42.77, 50.3, 42.79, 41.84, 44.19, 43.36, 45.62, |
| 760 | 45.09, 44.95, 50.36, 47.21, 47.77, 52.04, 47.46, 44.19, 47.22, 45.55, 40.65, 39.64, 37.26, 40.71, 42.15, |
| 761 | 36.45, 39.14, 36.62] |
| 762 | => " 60.61 ┤ ╭╮ ╭╮ |
| 763 | 59.60 ┤ ╭╮ │╰─╯│ |
| 764 | 58.60 ┤ ││ ╭╮│ │ |
| 765 | 57.59 ┼╮ ╭╯│ │││ │ |
| 766 | 56.58 ┤│╭╯ │ ╭─╮ │╰╯ ╰╮ |
| 767 | 55.58 ┤││ │ │ │╭─╯ │╭╮ ╭╮ |
| 768 | 54.57 ┤╰╯ │ │ ││ ╰╯╰╮ ╭╮││ ╭╮ |
| 769 | 53.56 ┤ │╭╯ ╰╯ │ ││││ ││ |
| 770 | 52.56 ┤ ╰╯ │ ││││ ││ ╭╮ |
| 771 | 51.55 ┤ ╰╮││││ ││ ││ |
| 772 | 50.54 ┤ ╰╯│││ ││╭╮ ╭╮ ││ |
| 773 | 49.54 ┤ │││ ╭─╮ ││││ ││ ││ |
| 774 | 48.53 ┤ │││ │ │ ││││ ││ ││ |
| 775 | 47.52 ┤ ╰╯│ │ ╰╮││││ │╰─╯╰╮╭╮ |
| 776 | 46.52 ┤ ╰─╮│ ╰╯│││ │ │││ |
| 777 | 45.51 ┤ ╰╯ │││ ╭──╯ ││╰╮ |
| 778 | 44.50 ┤ │││ ╭╮│ ╰╯ │ |
| 779 | 43.50 ┤ ││╰╮│╰╯ │ |
| 780 | 42.49 ┤ ╰╯ ╰╯ │ ╭╮ |
| 781 | 41.48 ┤ │ ││ |
| 782 | 40.48 ┤ ╰╮ ╭╯│ |
| 783 | 39.47 ┤ ╰╮│ │╭╮ |
| 784 | 38.46 ┤ ││ │││ |
| 785 | 37.46 ┤ ╰╯ │││ |
| 786 | 36.45 ┤ ╰╯╰" |
| 787 | ); |
| 788 | |
| 789 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 790 | fn test_min_maxrust-analyzer cargo rasciigraph 0.3.0 tests/test_min_max().() { |
| 791 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 792 | (-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().2f64, 11f64), |
| 793 | craterust-analyzer cargo rasciigraph 0.3.0 crate/::min_maxrust-analyzer cargo rasciigraph 0.3.0 min_max().(&[2f64, 1f64, 1f64, 2f64, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().2f64, 5f64, 7f64, 11f64, 3f64, 7f64, 1f64]) |
| 794 | ); |
| 795 | } |
| 796 | |
| 797 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 798 | fn test_plot_manyrust-analyzer cargo rasciigraph 0.3.0 tests/test_plot_many().(){ |
| 799 | let res = superrust-analyzer cargo rasciigraph 0.3.0 crate/::plot_manyrust-analyzer cargo rasciigraph 0.3.0 plot_many().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0f64,1.0,2.0,3.0,3.0,3.0,2.0,0.0], vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![5.0,4.0,2.0,1.0, 4.0, 6.0,6.0]], superrust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().()); |
| 800 | let exp = " 6.00 ┤ ╭─ |
| 801 | 5.00 ┼╮ │ |
| 802 | 4.00 ┤╰╮ ╭╯ |
| 803 | 3.00 ┤ │╭│─╮ |
| 804 | 2.00 ┤ ╰╮│ ╰╮ |
| 805 | 1.00 ┤╭╯╰╯ │ |
| 806 | 0.00 ┼╯ ╰"; |
| 807 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(res, exp); |
| 808 | } |
| 809 | |
| 810 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 811 | fn test_plot_many_tworust-analyzer cargo rasciigraph 0.3.0 tests/test_plot_many_two().(){ |
| 812 | let res = superrust-analyzer cargo rasciigraph 0.3.0 crate/::plot_manyrust-analyzer cargo rasciigraph 0.3.0 plot_many().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0.0f64, 1.0, 0.0], vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![2.0, 3.0, 4.0, 3.0, 2.0], vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![4.0, 5.0, 6.0, 7.0, 6.0, 5.0,4.0]], superrust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().().with_widthrust-analyzer cargo rasciigraph 0.3.0 impl#[Config]with_width().(21)); |
| 813 | let exp = " 7.00 ┤ ╭──╮ |
| 814 | 6.00 ┤ ╭───╯ ╰───╮ |
| 815 | 5.00 ┤ ╭──╯ ╰──╮ |
| 816 | 4.00 ┼─╯ ╭───╮ ╰─ |
| 817 | 3.00 ┤ ╭──╯ ╰──╮ |
| 818 | 2.00 ┼─╯ ╰── |
| 819 | 1.00 ┤ ╭───╮ |
| 820 | 0.00 ┼─╯ ╰─ "; |
| 821 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(res, exp); |
| 822 | // assert_eq!(res.as_bytes(), exp.as_bytes()); |
| 823 | } |
| 824 | |
| 825 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 826 | fn test_plot_many_threerust-analyzer cargo rasciigraph 0.3.0 tests/test_plot_many_three().(){ |
| 827 | let res = superrust-analyzer cargo rasciigraph 0.3.0 crate/::plot_manyrust-analyzer cargo rasciigraph 0.3.0 plot_many().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0.0f64, 0.0, 2.0, 2.0, f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN.], vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN., f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN., f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN., 0.0, 0.0, 2.0, 2.0]], superrust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().()); |
| 828 | let exp = " 2.00 ┤ ╭──╭─ |
| 829 | 1.00 ┼────│─ |
| 830 | 0.00 ┼─╯──╯ "; |
| 831 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(res, exp); |
| 832 | } |
| 833 | |
| 834 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 835 | fn test_plot_many_fourrust-analyzer cargo rasciigraph 0.3.0 tests/test_plot_many_four().(){ |
| 836 | |
| 837 | let res = superrust-analyzer cargo rasciigraph 0.3.0 crate/::plot_manyrust-analyzer cargo rasciigraph 0.3.0 plot_many().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![0.1f64, 0.2, 0.3, f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN., 0.5, 0.6, 0.7, f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN., f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN., 0.9, 1.0]], superrust-analyzer cargo rasciigraph 0.3.0 crate/::Configrust-analyzer cargo rasciigraph 0.3.0 Config#::defaultrust-analyzer cargo rasciigraph 0.3.0 impl#[Config][Default]default().()); |
| 838 | let exp = " 1.00 ┤ ╭ |
| 839 | 0.90 ┤ ─╯ |
| 840 | 0.80 ┤ |
| 841 | 0.70 ┤ ╭─ |
| 842 | 0.60 ┤ ╭╯ |
| 843 | 0.50 ┤ ─╯ |
| 844 | 0.40 ┤ |
| 845 | 0.30 ┤ ╭─ |
| 846 | 0.20 ┤╭╯ |
| 847 | 0.10 ┼╯ "; |
| 848 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(res, exp); |
| 849 | } |
| 850 | |
| 851 | } |