Struct plotpy::Plot [−][src]
pub struct Plot { pub option_hide_bottom_border: bool, pub option_hide_left_border: bool, pub option_hide_right_border: bool, pub option_hide_top_border: bool, pub font_size_labels: f64, pub font_size_legend: f64, pub font_size_x_tick: f64, pub font_size_y_tick: f64, // some fields omitted }
Expand description
Driver structure that calls Python
use plotpy::*; let mut plot = Plot::new(); plot.axes_equal(); plot.axes_range(-1.0, 1.0, 0.0, 2.0); plot.grid_and_labels("x-label", "y-label"); plot.save("/tmp/plotpy", "example_plot", "svg");
Fields
option_hide_bottom_border: bool
hide bottom frame border
option_hide_left_border: bool
hide left frame border
option_hide_right_border: bool
hide right frame border
option_hide_top_border: bool
hide top frame border
font_size_labels: f64
font size for labels
font_size_legend: f64
font size for legend
font_size_x_tick: f64
font size for x-ticks
font_size_y_tick: f64
font size for y-ticks
Implementations
Adds new graph entity
Saves figure to disk
Arguments
output_dir
- Creates a directory to save the figure, and temporary filesfilename_key
- The filename without extensionfilename_ext
- The extension of the filename; e.g., “png” or “svg”
Configures subplots
Arguments
row
- number of rows in the subplot gridcol
- number of columns in the subplot gridindex
- activate current subplot; indices start at one [1-based]
Sets the horizontal gap between subplots
Sets the vertical gap between subplots
Sets same scale for both axes
Sets x and y limits
Sets x-range (i.e. limits)
Sets y-range (i.e. limits)
Adds grid, labels, and legend
Clears current figure