Struct rustplotlib::Axes2D
[−]
[src]
pub struct Axes2D<'a> { /* fields omitted */ }
Represents an instance of matplotlib.axes.Axes
.
Methods
impl<'a> Axes2D<'a>
[src]
fn new() -> Self
create an empty axes.
This method is the shortcut of Default::default()
.
fn add<P: Into<PlotData<'a>>>(self, p: P) -> Self
add a plot data.
fn xlabel(self, text: &str) -> Self
set the label text of x axis.
fn ylabel(self, text: &str) -> Self
set the label text of y axis.
fn grid(self, enabled: bool) -> Self
set whether the grid is shown or not.
fn legend(self, loc: &str) -> Self
set the location of legend in the axes.
if the value of loc
is empty, the legend is hidden.
fn xlim(self, lb: f64, ub: f64) -> Self
set the range of x axis.
fn ylim(self, lb: f64, ub: f64) -> Self
set the range of y axis.