Struct gnuplot::Axes3D [−][src]
pub struct Axes3D { /* fields omitted */ }3D axes that is used for drawing 3D plots
Methods
impl Axes3D[src]
impl Axes3Dpub 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[src]
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 SelfDraws 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 thedimensionsargument.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).
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[src]
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 SelfPlot 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
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[src]
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 SelfPlot 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
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[src]
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 SelfA 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
pub fn set_view<'l>(&'l mut self, pitch: f64, yaw: f64) -> &'l mut Self[src]
pub fn set_view<'l>(&'l mut self, pitch: f64, yaw: f64) -> &'l mut SelfSets 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.
pub fn set_view_map<'l>(&'l mut self) -> &'l mut Self[src]
pub fn set_view_map<'l>(&'l mut self) -> &'l mut SelfSets the view to be a map. Useful for images and contour plots.
pub fn set_z_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut Self[src]
pub fn set_z_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut SelfSet 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
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[src]
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 SelfLike set_x_ticks but for the Z axis.
pub fn set_z_ticks_custom<'l, T: DataType, TL: IntoIterator<Item = Tick<T>>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut Self[src]
pub fn set_z_ticks_custom<'l, T: DataType, TL: IntoIterator<Item = Tick<T>>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut SelfLike set_x_ticks_custom but for the the Y axis.
pub fn set_z_range<'l>(
&'l mut self,
min: AutoOption<f64>,
max: AutoOption<f64>
) -> &'l mut Self[src]
pub fn set_z_range<'l>(
&'l mut self,
min: AutoOption<f64>,
max: AutoOption<f64>
) -> &'l mut Selfpub fn set_z_reverse<'l>(&'l mut self, reverse: bool) -> &'l mut Self[src]
pub fn set_z_reverse<'l>(&'l mut self, reverse: bool) -> &'l mut SelfSets z axis to reverse.
pub fn set_z_log<'l>(&'l mut self, base: Option<f64>) -> &'l mut Self[src]
pub fn set_z_log<'l>(&'l mut self, base: Option<f64>) -> &'l mut SelfSets 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
pub fn set_z_grid<'l>(&'l mut self, show: bool) -> &'l mut Self[src]
pub fn set_z_grid<'l>(&'l mut self, show: bool) -> &'l mut Selfpub fn show_contours<'l>(
&'l mut self,
base: bool,
surface: bool,
style: ContourStyle,
label: AutoOption<&str>,
levels: AutoOption<u32>
) -> &'l mut Self[src]
pub fn show_contours<'l>(
&'l mut self,
base: bool,
surface: bool,
style: ContourStyle,
label: AutoOption<&str>,
levels: AutoOption<u32>
) -> &'l mut SelfShow 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.
pub fn show_contours_custom<'l, T: DataType, TC: IntoIterator<Item = T>>(
&'l mut self,
base: bool,
surface: bool,
style: ContourStyle,
label: AutoOption<&str>,
levels: TC
) -> &'l mut Self[src]
pub fn show_contours_custom<'l, T: DataType, TC: IntoIterator<Item = T>>(
&'l mut self,
base: bool,
surface: bool,
style: ContourStyle,
label: AutoOption<&str>,
levels: TC
) -> &'l mut SelfShow 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
impl AxesCommon for Axes3D[src]
impl AxesCommon for Axes3Dfn set_pos_grid<'l>(
&'l mut self,
nrow: u32,
ncol: u32,
pos: u32
) -> &'l mut Self[src]
fn set_pos_grid<'l>(
&'l mut self,
nrow: u32,
ncol: u32,
pos: u32
) -> &'l mut SelfSet the position of the axes on the figure using grid coordinates. # Arguments * nrow - Number of rows in the grid. Must be greater than 0. * ncol - Number of columns in the grid. Must be greater than 0. * pos - Which grid cell to place this axes in, counting from top-left corner, going left and then down, starting at 0. Read more
fn set_pos<'l>(&'l mut self, x: f64, y: f64) -> &'l mut Self[src]
fn set_pos<'l>(&'l mut self, x: f64, y: f64) -> &'l mut SelfSet the position of the axes on the figure using screen coordinates. The coordinates refer to the bottom-left corner of the axes # Arguments * x - X position. Ranges from 0 to 1 * y - Y position. Ranges from 0 to 1 Read more
fn set_size<'l>(&'l mut self, w: f64, h: f64) -> &'l mut Self[src]
fn set_size<'l>(&'l mut self, w: f64, h: f64) -> &'l mut SelfSet the size of the axes # Arguments * w - Width. Ranges from 0 to 1 * h - Height. Ranges from 0 to 1 Read more
fn set_aspect_ratio<'l>(&'l mut self, ratio: AutoOption<f64>) -> &'l mut Self[src]
fn set_aspect_ratio<'l>(&'l mut self, ratio: AutoOption<f64>) -> &'l mut SelfSet the aspect ratio of the axes # Arguments * ratio - The aspect ratio. Set to Auto to return the ratio to default Read more
fn set_x_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut Self[src]
fn set_x_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut SelfSet the label for the X axis # Arguments * text - Text of the label. Pass an empty string to hide the label * options - Array of LabelOption controlling the appearance of the label. Relevant options are: * Offset - Specifies the offset of the label * Font - Specifies the font of the label * TextColor - Specifies the color of the label * Rotate - Specifies the rotation of the label * Align - Specifies how to align the label Read more
fn set_y_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut Self[src]
fn set_y_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut SelfLike set_x_label, but for the Y axis
fn set_cb_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut Self[src]
fn set_cb_label<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut SelfLike set_x_label, but for the color bar
fn set_title<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut Self[src]
fn set_title<'l>(
&'l mut self,
text: &str,
options: &[LabelOption<&str>]
) -> &'l mut SelfSet the title for the axes # Arguments * text - Text of the title. Pass an empty string to hide the title * options - Array of LabelOption<&str> controlling the appearance of the title. Relevant options are: * Offset - Specifies the offset of the label * Font - Specifies the font of the label * TextColor - Specifies the color of the label * Rotate - Specifies the rotation of the label * Align - Specifies how to align the label Read more
fn label<'l>(
&'l mut self,
text: &str,
x: Coordinate,
y: Coordinate,
options: &[LabelOption<&str>]
) -> &'l mut Self[src]
fn label<'l>(
&'l mut self,
text: &str,
x: Coordinate,
y: Coordinate,
options: &[LabelOption<&str>]
) -> &'l mut SelfAdds a label to the plot, with an optional marker. # Arguments * text - Text of the label * x - X coordinate of the label * y - Y coordinate of the label * options - Array of LabelOption<&str> controlling the appearance of the label. Relevant options are: * Offset - Specifies the offset of the label * Font - Specifies the font of the label * TextColor - Specifies the color of the label * Rotate - Specifies the rotation of the label * Align - Specifies how to align the label * MarkerSymbol - Specifies the symbol for the marker. Omit to hide the marker * MarkerSize - Specifies the size for the marker * MarkerColor - Specifies the color for the marker Read more
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[src]
fn set_x_ticks<'l>(
&'l mut self,
tick_placement: Option<(AutoOption<f64>, u32)>,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut SelfSets the properties of the ticks on the X axis. Read more
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[src]
fn set_y_ticks<'l>(
&'l mut self,
tick_placement: Option<(AutoOption<f64>, u32)>,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut SelfLike set_x_ticks but for the Y axis.
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[src]
fn set_cb_ticks<'l>(
&'l mut self,
tick_placement: Option<(AutoOption<f64>, u32)>,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut SelfLike set_x_ticks but for the color bar axis.
fn set_x_ticks_custom<'l, T: DataType, TL: IntoIterator<Item = Tick<T>>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut Self[src]
fn set_x_ticks_custom<'l, T: DataType, TL: IntoIterator<Item = Tick<T>>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut SelfSets ticks on the X axis with specified labels at specified positions. Read more
fn set_y_ticks_custom<'l, T: DataType, TL: IntoIterator<Item = Tick<T>>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut Self[src]
fn set_y_ticks_custom<'l, T: DataType, TL: IntoIterator<Item = Tick<T>>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut SelfLike set_x_ticks_custom but for the the Y axis.
fn set_cb_ticks_custom<'l, T: DataType, TL: IntoIterator<Item = Tick<T>>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut Self[src]
fn set_cb_ticks_custom<'l, T: DataType, TL: IntoIterator<Item = Tick<T>>>(
&'l mut self,
ticks: TL,
tick_options: &[TickOption<&str>],
label_options: &[LabelOption<&str>]
) -> &'l mut SelfLike set_x_ticks_custom but for the the color bar axis.
fn set_x_range<'l>(
&'l mut self,
min: AutoOption<f64>,
max: AutoOption<f64>
) -> &'l mut Self[src]
fn set_x_range<'l>(
&'l mut self,
min: AutoOption<f64>,
max: AutoOption<f64>
) -> &'l mut SelfSet the range of values for the X axis. Read more
fn set_y_range<'l>(
&'l mut self,
min: AutoOption<f64>,
max: AutoOption<f64>
) -> &'l mut Self[src]
fn set_y_range<'l>(
&'l mut self,
min: AutoOption<f64>,
max: AutoOption<f64>
) -> &'l mut SelfSet the range of values for the Y axis. Read more
fn set_x_reverse<'l>(&'l mut self, reverse: bool) -> &'l mut Self[src]
fn set_x_reverse<'l>(&'l mut self, reverse: bool) -> &'l mut SelfSets X axis to reverse. # Arguments * reverse - Boolean, true to reverse axis, false will not reverse Read more
fn set_y_reverse<'l>(&'l mut self, reverse: bool) -> &'l mut Self[src]
fn set_y_reverse<'l>(&'l mut self, reverse: bool) -> &'l mut SelfSets Y axis to reverse. # Arguments * reverse - Boolean, true to reverse axis, false will not reverse Read more
fn set_cb_range<'l>(
&'l mut self,
min: AutoOption<f64>,
max: AutoOption<f64>
) -> &'l mut Self[src]
fn set_cb_range<'l>(
&'l mut self,
min: AutoOption<f64>,
max: AutoOption<f64>
) -> &'l mut SelfSet the range of values for the color bar axis. Read more
fn set_x_log<'l>(&'l mut self, base: Option<f64>) -> &'l mut Self[src]
fn set_x_log<'l>(&'l mut self, base: Option<f64>) -> &'l mut SelfSets the X axis be logarithmic. Note that the range must be non-negative for this to be valid. Read more
fn set_y_log<'l>(&'l mut self, base: Option<f64>) -> &'l mut Self[src]
fn set_y_log<'l>(&'l mut self, base: Option<f64>) -> &'l mut SelfSets the Y axis be logarithmic. Note that the range must be non-negative for this to be valid. Read more
fn set_cb_log<'l>(&'l mut self, base: Option<f64>) -> &'l mut Self[src]
fn set_cb_log<'l>(&'l mut self, base: Option<f64>) -> &'l mut SelfSets the color bar axis be logarithmic. Note that the range must be non-negative for this to be valid. Read more
fn set_x_grid<'l>(&'l mut self, show: bool) -> &'l mut Self[src]
fn set_x_grid<'l>(&'l mut self, show: bool) -> &'l mut SelfShows the grid on the X axis. Read more
fn set_y_grid<'l>(&'l mut self, show: bool) -> &'l mut Self[src]
fn set_y_grid<'l>(&'l mut self, show: bool) -> &'l mut SelfShows the grid on the Y axis. Read more
fn set_cb_grid<'l>(&'l mut self, show: bool) -> &'l mut Self[src]
fn set_cb_grid<'l>(&'l mut self, show: bool) -> &'l mut SelfShows the grid on the color bar axis. Read more
fn set_grid_options<'l>(
&'l mut self,
front: bool,
options: &[PlotOption<&str>]
) -> &'l mut Self[src]
fn set_grid_options<'l>(
&'l mut self,
front: bool,
options: &[PlotOption<&str>]
) -> &'l mut SelfSet the grid options. Read more
fn set_palette(&mut self, palette: PaletteType) -> &mut Self[src]
fn set_palette(&mut self, palette: PaletteType) -> &mut SelfSets the palette used for 3D surface and image plots Read more
fn set_custom_palette<T: IntoIterator<Item = (f32, f32, f32, f32)>>(
&mut self,
palette_generator: T
) -> &mut Self[src]
fn set_custom_palette<T: IntoIterator<Item = (f32, f32, f32, f32)>>(
&mut self,
palette_generator: T
) -> &mut SelfSets a custom palette used for 3D surface and image plots. A custom palette is specified by a sequence of 4-tuples (with at least one element). The first element is the grayscale value that is mapped to the remaining three elements which specify the red, green and blue components of the color. The grayscale values must be non-decreasing. All values must range from 0 to 1. Read more