pub trait Matplotlib: Debug {
// Required methods
fn is_prelude(&self) -> bool;
fn data(&self) -> Option<Value>;
fn py_cmd(&self) -> String;
}Expand description
An executable element in a Matplotlib script.
Required Methods§
Sourcefn is_prelude(&self) -> bool
fn is_prelude(&self) -> bool
Return true if self should be considered as a prelude item, which
are execute in the order seen but before any non-prelude items.
Sourcefn data(&self) -> Option<Value>
fn data(&self) -> Option<Value>
Optionally encode some data as JSON, to be made available at self’s
call site in the matplotlib script.
Sourcefn py_cmd(&self) -> String
fn py_cmd(&self) -> String
Write self as Python. The (default) local environment will hold the
following variables:
data: Ifself.datareturnsSome, that data will be available under this name.figandax: The current figure of typematplotlib.pyplot.Figureand the current set of axes, of typematplotlib.axes.Axes.