pub struct Axes3D { /* private fields */ }
Expand description
3D axes that is used for drawing 3D plots
Implementations§
Source§impl Axes3D
impl Axes3D
Sourcepub fn surface<'l, T: DataType, X: IntoIterator<Item = T>>(
&'l mut self,
mat: X,
num_rows: usize,
num_cols: usize,
dimensions: Option<(f64, f64, f64, f64)>,
options: &[PlotOption<&str>],
) -> &'l mut Self
pub fn surface<'l, T: DataType, X: IntoIterator<Item = T>>( &'l mut self, mat: X, num_rows: usize, num_cols: usize, dimensions: Option<(f64, f64, f64, f64)>, options: &[PlotOption<&str>], ) -> &'l mut Self
Draws a 3D surface from a rectangular array of data by connecting the individual datapoints with polygons.
#Arguments:
mat
- Row-major 2D array signifying the Z coordinate of the datapoints. The X and Y coordinates of the datapoints are determined automatically, and optionally scaled using thedimensions
argument.num_rows
- Number of rows in the data arraynum_cols
- Number of columns in the data arraydimensions
- Optional X and Y coordinates of the first and last data points (with the rest of the coordinates spaced evenly between). By default this will be(0, 0)
and(num_rows - 1, num_cols - 1)
.options
- Array of PlotOption controlling the appearance of the surface. Relevant options are:Caption
- Specifies the caption for this dataset. Use an empty string to hide it (default).
Sourcepub fn points<'l, Tx: DataType, X: IntoIterator<Item = Tx>, Ty: DataType, Y: IntoIterator<Item = Ty>, Tz: DataType, Z: IntoIterator<Item = Tz>>(
&'l mut self,
x: X,
y: Y,
z: Z,
options: &[PlotOption<&str>],
) -> &'l mut Self
pub fn points<'l, Tx: DataType, X: IntoIterator<Item = Tx>, Ty: DataType, Y: IntoIterator<Item = Ty>, Tz: DataType, Z: IntoIterator<Item = Tz>>( &'l mut self, x: X, y: Y, z: Z, options: &[PlotOption<&str>], ) -> &'l mut Self
Plot a 3D scatter-plot with a point standing in for each data point
§Arguments
x
- x valuesy
- y valuesz
- z valuesoptions
- Array of PlotOption<&str> controlling the appearance of the plot element. The relevant options are:Caption
- Specifies the caption for this dataset. Use an empty string to hide it (default).PointSymbol
- Sets symbol for each pointPointSize
- Sets the size of each pointColor
- Sets the color
Sourcepub fn lines<'l, Tx: DataType, X: IntoIterator<Item = Tx>, Ty: DataType, Y: IntoIterator<Item = Ty>, Tz: DataType, Z: IntoIterator<Item = Tz>>(
&'l mut self,
x: X,
y: Y,
z: Z,
options: &[PlotOption<&str>],
) -> &'l mut Self
pub fn lines<'l, Tx: DataType, X: IntoIterator<Item = Tx>, Ty: DataType, Y: IntoIterator<Item = Ty>, Tz: DataType, Z: IntoIterator<Item = Tz>>( &'l mut self, x: X, y: Y, z: Z, options: &[PlotOption<&str>], ) -> &'l mut Self
Plot a 3D scatter-plot with lines connecting each data point
§Arguments
x
- x valuesy
- y valuesz
- z valuesoptions
- Array of PlotOption<&str> controlling the appearance of the plot element. The relevant options are:Caption
- Specifies the caption for this dataset. Use an empty string to hide it (default).PointSymbol
- Sets symbol for each pointPointSize
- Sets the size of each pointColor
- Sets the color
Sourcepub fn lines_points<'l, Tx: DataType, X: IntoIterator<Item = Tx>, Ty: DataType, Y: IntoIterator<Item = Ty>, Tz: DataType, Z: IntoIterator<Item = Tz>>(
&'l mut self,
x: X,
y: Y,
z: Z,
options: &[PlotOption<&str>],
) -> &'l mut Self
pub fn lines_points<'l, Tx: DataType, X: IntoIterator<Item = Tx>, Ty: DataType, Y: IntoIterator<Item = Ty>, Tz: DataType, Z: IntoIterator<Item = Tz>>( &'l mut self, x: X, y: Y, z: Z, options: &[PlotOption<&str>], ) -> &'l mut Self
A combination of lines and points methods (drawn in that order).
§Arguments
x
- x valuesy
- y valuesz
- z valuesoptions
- Array of PlotOption<&str> controlling the appearance of the plot element
Sourcepub fn set_view(&mut self, pitch: f64, yaw: f64) -> &mut Self
pub fn set_view(&mut self, pitch: f64, yaw: f64) -> &mut Self
Sets the 3D view.
#Arguments:
pitch
- Pitch, in degrees. Value of 0 is looking straight down on the XY plane, Z pointing out of the screen.yaw
- Yaw, in degrees. Value of 0 is looking at the XZ plane, Y point into the screen.
Sourcepub fn set_view_map(&mut self) -> &mut Self
pub fn set_view_map(&mut self) -> &mut Self
Sets the view to be a map. Useful for images and contour plots.
Sourcepub fn set_z_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>],
) -> &'l mut Self
pub fn set_z_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>], ) -> &'l mut Self
Set the label for the Z axis
§Arguments
text
- Text of the label. Pass an empty string to hide the labeloptions
- Array of LabelOption controlling the appearance of the label. Relevant options are:Offset
- Specifies the offset of the labelFont
- Specifies the font of the labelTextColor
- Specifies the color of the labelRotate
- Specifies the rotation of the labelAlign
- Specifies how to align the label
Sourcepub fn set_x_axis<'l>(
&'l mut self,
show: bool,
options: &[PlotOption<&str>],
) -> &'l mut Self
pub fn set_x_axis<'l>( &'l mut self, show: bool, options: &[PlotOption<&str>], ) -> &'l mut Self
Sets the properties of x axis.
§Arguments
show
- Whether or not draw the axisoptions
- Array of PlotOption<&str> controlling the appearance of the axis. Relevant options are:Color
- Specifies the color of the borderLineStyle
- Specifies the style of the borderLineWidth
- Specifies the width of the border
Sourcepub fn set_y_axis<'l>(
&'l mut self,
show: bool,
options: &[PlotOption<&str>],
) -> &'l mut Self
pub fn set_y_axis<'l>( &'l mut self, show: bool, options: &[PlotOption<&str>], ) -> &'l mut Self
Like set_x_axis
but for the y axis.
Sourcepub fn set_z_axis<'l>(
&'l mut self,
show: bool,
options: &[PlotOption<&str>],
) -> &'l mut Self
pub fn set_z_axis<'l>( &'l mut self, show: bool, options: &[PlotOption<&str>], ) -> &'l mut Self
Like set_x_axis
but for the z axis.
Sourcepub fn set_z_ticks<'l>(
&'l mut self,
tick_placement: Option<(AutoOption<f64>, u32)>,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
pub fn set_z_ticks<'l>( &'l mut self, tick_placement: Option<(AutoOption<f64>, u32)>, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
Like set_x_ticks
but for the Z axis.
Sourcepub fn set_z_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
pub fn set_z_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>( &'l mut self, ticks: TL, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
Like set_x_ticks_custom
but for the the Y axis.
Sourcepub fn set_z_range(
&mut self,
min: AutoOption<f64>,
max: AutoOption<f64>,
) -> &mut Self
pub fn set_z_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64>, ) -> &mut Self
Sourcepub fn set_z_reverse(&mut self, reverse: bool) -> &mut Self
pub fn set_z_reverse(&mut self, reverse: bool) -> &mut Self
Sets z axis to reverse.
Sourcepub fn set_z_log(&mut self, base: Option<f64>) -> &mut Self
pub fn set_z_log(&mut self, base: Option<f64>) -> &mut Self
Sets the Z axis be logarithmic. Note that the range must be non-negative for this to be valid.
§Arguments
base
- If Some, then specifies base of the logarithm, if None makes the axis not be logarithmic
Sourcepub fn set_z_grid(&mut self, show: bool) -> &mut Self
pub fn set_z_grid(&mut self, show: bool) -> &mut Self
Sourcepub fn set_z_time(&mut self, is_time: bool) -> &mut Self
pub fn set_z_time(&mut self, is_time: bool) -> &mut Self
Sets the Z axis be time. Note that the range must be non-negative for this to be valid.
If true, the axis is interpreted as seconds from the Unix epoch. Use the Format
TickOption to
specify the formatting of the ticks (see strftime format spec for valid values).
§Arguments
is_time
- Whether this axis is time or not.
Sourcepub fn show_contours(
&mut self,
base: bool,
surface: bool,
style: ContourStyle,
label: AutoOption<&str>,
levels: AutoOption<u32>,
) -> &mut Self
pub fn show_contours( &mut self, base: bool, surface: bool, style: ContourStyle, label: AutoOption<&str>, levels: AutoOption<u32>, ) -> &mut Self
Show contours (lines of equal Z value) at automatically determined levels.
§Arguments
base
- Show contours on the base of the plot (XY plane)surface
- Show the contours on the surface itselfstyle
- Style of the contourslabel
- Auto sets the label automatically and enables the legend, Fix() allows you specify a format string (using C style formatting), otherwise an empty string disables the legend and labels.levels
- Auto picks some default number of levels, otherwise you can pass a set nominal number instead. The number is nominal as contours are placed at nice values of Z, and thus there may be fewer of them than this number.
Sourcepub fn show_contours_custom<T: DataType, TC: IntoIterator<Item = T>>(
&mut self,
base: bool,
surface: bool,
style: ContourStyle,
label: AutoOption<&str>,
levels: TC,
) -> &mut Self
pub fn show_contours_custom<T: DataType, TC: IntoIterator<Item = T>>( &mut self, base: bool, surface: bool, style: ContourStyle, label: AutoOption<&str>, levels: TC, ) -> &mut Self
Show contours (lines of equal Z value) at specific levels.
§Arguments
base
- Show contours on the base of the plot (XY plane)surface
- Show the contours on the surface itselfstyle
- Style of the contourslabel
- Auto sets the label automatically and enables the legend, Fix() allows you specify a format string (using C style formatting), otherwise an empty string disables the legend and labels.levels
- A set of levels.
Trait Implementations§
Source§impl AxesCommon for Axes3D
impl AxesCommon for Axes3D
Source§fn set_pos_grid(&mut self, nrow: u32, ncol: u32, pos: u32) -> &mut Self
fn set_pos_grid(&mut self, nrow: u32, ncol: u32, pos: u32) -> &mut Self
Source§fn set_pos(&mut self, x: f64, y: f64) -> &mut Self
fn set_pos(&mut self, x: f64, y: f64) -> &mut Self
Source§fn set_box_width(&mut self, width: f64, is_relative: bool) -> &mut Self
fn set_box_width(&mut self, width: f64, is_relative: bool) -> &mut Self
Source§fn set_aspect_ratio(&mut self, ratio: AutoOption<f64>) -> &mut Self
fn set_aspect_ratio(&mut self, ratio: AutoOption<f64>) -> &mut Self
Source§fn set_x_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_x_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>], ) -> &'l mut Self
Source§fn set_y_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_y_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_label
, but for the Y axisSource§fn set_x2_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_x2_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_label
, but for the secondary X axisSource§fn set_y2_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_y2_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_label
, but for the secondary Y axisSource§fn set_cb_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_cb_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_label
, but for the color barSource§fn set_title<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_title<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>], ) -> &'l mut Self
Source§fn label<'l>(
&'l mut self,
text: &str,
x: Coordinate,
y: Coordinate,
options: &[LabelOption<&str>],
) -> &'l mut Self
fn label<'l>( &'l mut self, text: &str, x: Coordinate, y: Coordinate, options: &[LabelOption<&str>], ) -> &'l mut Self
Source§fn set_x_ticks<'l>(
&'l mut self,
tick_placement: Option<(AutoOption<f64>, u32)>,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_x_ticks<'l>( &'l mut self, tick_placement: Option<(AutoOption<f64>, u32)>, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
Source§fn set_y_ticks<'l>(
&'l mut self,
tick_placement: Option<(AutoOption<f64>, u32)>,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_y_ticks<'l>( &'l mut self, tick_placement: Option<(AutoOption<f64>, u32)>, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_ticks
but for the Y axis.Source§fn set_x2_ticks<'l>(
&'l mut self,
tick_placement: Option<(AutoOption<f64>, u32)>,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_x2_ticks<'l>( &'l mut self, tick_placement: Option<(AutoOption<f64>, u32)>, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_ticks
but for the secondary X axis. Read moreSource§fn set_y2_ticks<'l>(
&'l mut self,
tick_placement: Option<(AutoOption<f64>, u32)>,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_y2_ticks<'l>( &'l mut self, tick_placement: Option<(AutoOption<f64>, u32)>, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_ticks
but for the secondary Y axis. Read moreSource§fn set_cb_ticks<'l>(
&'l mut self,
tick_placement: Option<(AutoOption<f64>, u32)>,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_cb_ticks<'l>( &'l mut self, tick_placement: Option<(AutoOption<f64>, u32)>, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_ticks
but for the color bar axis.Source§fn set_x_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_x_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>( &'l mut self, ticks: TL, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
Source§fn set_y_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_y_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>( &'l mut self, ticks: TL, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_ticks_custom
but for the the Y axis.Source§fn set_x2_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_x2_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>( &'l mut self, ticks: TL, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_ticks_custom
but for the the secondary X axis.Source§fn set_y2_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_y2_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>( &'l mut self, ticks: TL, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_ticks_custom
but for the the secondary Y axis.Source§fn set_cb_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>],
) -> &'l mut Self
fn set_cb_ticks_custom<'l, T: DataType, S: ToString, TickT: Borrow<Tick<T, S>>, TL: IntoIterator<Item = TickT>>( &'l mut self, ticks: TL, tick_options: &[TickOption<&str>], label_options: &[LabelOption<&str>], ) -> &'l mut Self
set_x_ticks_custom
but for the the color bar axis.