Trait Matplotlib

Source
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§

Source

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.

Source

fn data(&self) -> Option<Value>

Optionally encode some data as JSON, to be made available at self’s call site in the matplotlib script.

Source

fn py_cmd(&self) -> String

Write self as Python. The (default) local environment will hold the following variables:

  • data: If self.data returns Some, that data will be available under this name.
  • fig and ax: The current figure of type matplotlib.pyplot.Figure and the current set of axes, of type matplotlib.axes.Axes.

Implementors§

Source§

impl Matplotlib for AxHLine

Source§

impl Matplotlib for AxLine

Source§

impl Matplotlib for AxLineM

Source§

impl Matplotlib for AxText

Source§

impl Matplotlib for AxVLine

Source§

impl Matplotlib for Bar

Source§

impl Matplotlib for BarH

Source§

impl Matplotlib for Boxplot

Source§

impl Matplotlib for CLabel

Source§

impl Matplotlib for CLim

Source§

impl Matplotlib for CTickLabels

Source§

impl Matplotlib for CTicks

Source§

impl Matplotlib for Colorbar

Source§

impl Matplotlib for Contour

Source§

impl Matplotlib for Contourf

Source§

impl Matplotlib for DefInit

Source§

impl Matplotlib for DefPrelude

Source§

impl Matplotlib for Errorbar2

Source§

impl Matplotlib for Errorbar

Source§

impl Matplotlib for FigText

Source§

impl Matplotlib for FillBetween

Source§

impl Matplotlib for FillBetweenX

Source§

impl Matplotlib for FocusAx

Source§

impl Matplotlib for FocusCBar

Source§

impl Matplotlib for FocusFig

Source§

impl Matplotlib for FocusIm

Source§

impl Matplotlib for Grid

Source§

impl Matplotlib for Hist2d

Source§

impl Matplotlib for Hist

Source§

impl Matplotlib for Imshow

Source§

impl Matplotlib for Init3D

Source§

impl Matplotlib for InitGrid

Source§

impl Matplotlib for InitGridSpec

Source§

impl Matplotlib for InsetAxes

Source§

impl Matplotlib for Label

Source§

impl Matplotlib for Legend

Source§

impl Matplotlib for Lim

Source§

impl Matplotlib for Pie

Source§

impl Matplotlib for Plot3

Source§

impl Matplotlib for Plot

Source§

impl Matplotlib for Prelude

Source§

impl Matplotlib for Quiver3

Source§

impl Matplotlib for Quiver

Source§

impl Matplotlib for Raw

Source§

impl Matplotlib for RcParam

Source§

impl Matplotlib for Scale

Source§

impl Matplotlib for Scatter3

Source§

impl Matplotlib for Scatter

Source§

impl Matplotlib for SupTitle

Source§

impl Matplotlib for SupXLabel

Source§

impl Matplotlib for SupYLabel

Source§

impl Matplotlib for Surface

Source§

impl Matplotlib for TeX

Source§

impl Matplotlib for Text

Source§

impl Matplotlib for TickLabels

Source§

impl Matplotlib for TickParams

Source§

impl Matplotlib for Ticks

Source§

impl Matplotlib for TightLayout

Source§

impl Matplotlib for Title

Source§

impl Matplotlib for Trisurf

Source§

impl Matplotlib for ViewInit

Source§

impl Matplotlib for Violinplot