Closed supernova4869 closed 1 week ago
in file plot.rs:
/// Sets the ticks and labels along x pub fn set_ticks_x_labels<'a, S, T, U>(&mut self, ticks: &'a T, labels: &[S]) -> &mut Self where S: std::fmt::Display, T: AsVector<'a, U>, U: 'a + std::fmt::Display, { assert_eq!(ticks.vec_size(), labels.len()); vector_to_array(&mut self.buffer, "tx", ticks); vector_to_strings(&mut self.buffer, "lx", labels); ---> Line 713 write!(&mut self.buffer, "plt.gca().set_xticks(tx)\nplt.gca().set_xticklabels(lx)\n").unwrap(); self } /// Sets the ticks and labels along y pub fn set_ticks_y_labels<'a, S, T, U>(&mut self, ticks: &'a T, labels: &[S]) -> &mut Self where S: std::fmt::Display, T: AsVector<'a, U>, U: 'a + std::fmt::Display, { assert_eq!(ticks.vec_size(), labels.len()); vector_to_array(&mut self.buffer, "ty", ticks); vector_to_strings(&mut self.buffer, "ly", labels); ---> Line 727 write!(&mut self.buffer, "plt.gca().set_yticks(ty)\nplt.gca().set_yticklabels(ly)\n").unwrap(); self }
Thus it could avoid the label error with old version matplotlib.
Hi, thanks for the suggestion! This is now implemented in version 1.7.1
in file plot.rs:
Thus it could avoid the label error with old version matplotlib.