Trait gnuplot::AxesCommon

source ·
pub trait AxesCommon: AxesCommonPrivate {
Show 53 methods // Provided methods fn set_pos_grid(&mut self, nrow: u32, ncol: u32, pos: u32) -> &mut Self { ... } fn set_pos(&mut self, x: f64, y: f64) -> &mut Self { ... } fn set_size(&mut self, w: f64, h: f64) -> &mut Self { ... } fn set_aspect_ratio(&mut self, ratio: AutoOption<f64>) -> &mut Self { ... } fn set_x_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 { ... } fn set_x2_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 { ... } fn set_cb_label<'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 { ... } fn label<'l>( &'l mut self, text: &str, x: Coordinate, y: Coordinate, 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 { ... } 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_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_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_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_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_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_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_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_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_x_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self { ... } fn set_y_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self { ... } fn set_x2_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self { ... } fn set_y2_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self { ... } fn set_x_reverse(&mut self, reverse: bool) -> &mut Self { ... } fn set_y_reverse(&mut self, reverse: bool) -> &mut Self { ... } fn set_x2_reverse(&mut self, reverse: bool) -> &mut Self { ... } fn set_y2_reverse(&mut self, reverse: bool) -> &mut Self { ... } fn set_cb_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self { ... } fn set_x_log(&mut self, base: Option<f64>) -> &mut Self { ... } fn set_y_log(&mut self, base: Option<f64>) -> &mut Self { ... } fn set_x2_log(&mut self, base: Option<f64>) -> &mut Self { ... } fn set_y2_log(&mut self, base: Option<f64>) -> &mut Self { ... } fn set_cb_log(&mut self, base: Option<f64>) -> &mut Self { ... } fn set_x_grid(&mut self, show: bool) -> &mut Self { ... } fn set_x_minor_grid(&mut self, show: bool) -> &mut Self { ... } fn set_y_grid(&mut self, show: bool) -> &mut Self { ... } fn set_y_minor_grid(&mut self, show: bool) -> &mut Self { ... } fn set_x2_grid(&mut self, show: bool) -> &mut Self { ... } fn set_x2_minor_grid(&mut self, show: bool) -> &mut Self { ... } fn set_y2_grid(&mut self, show: bool) -> &mut Self { ... } fn set_y2_minor_grid(&mut self, show: bool) -> &mut Self { ... } fn set_cb_grid(&mut self, show: bool) -> &mut Self { ... } fn set_grid_options<'l>( &'l mut self, front: bool, options: &[PlotOption<&str>] ) -> &'l mut Self { ... } fn set_minor_grid_options<'l>( &'l mut self, options: &[PlotOption<&str>] ) -> &'l mut Self { ... } fn set_x_time(&mut self, is_time: bool) -> &mut Self { ... } fn set_y_time(&mut self, is_time: bool) -> &mut Self { ... } fn set_x2_time(&mut self, is_time: bool) -> &mut Self { ... } fn set_y2_time(&mut self, is_time: bool) -> &mut Self { ... } fn set_cb_time(&mut self, is_time: bool) -> &mut Self { ... } fn set_margins(&mut self, margins: &[MarginSide]) -> &mut Self { ... } fn set_palette( &mut self, palette: PaletteType<&[(f32, f32, f32, f32)]> ) -> &mut Self { ... }
}

Provided Methods§

source

fn set_pos_grid(&mut self, nrow: u32, ncol: u32, pos: u32) -> &mut Self

Set 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.
source

fn set_pos(&mut self, x: f64, y: f64) -> &mut Self

Set 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
source

fn set_size(&mut self, w: f64, h: f64) -> &mut Self

Set the size of the axes

§Arguments
  • w - Width. Ranges from 0 to 1
  • h - Height. Ranges from 0 to 1
source

fn set_aspect_ratio(&mut self, ratio: AutoOption<f64>) -> &mut Self

Set the aspect ratio of the axes

§Arguments
  • ratio - The aspect ratio. Set to Auto to return the ratio to default
source

fn set_x_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>] ) -> &'l mut Self

Set 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
source

fn set_y_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>] ) -> &'l mut Self

Like set_x_label, but for the Y axis

source

fn set_x2_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>] ) -> &'l mut Self

Like set_x_label, but for the secondary X axis

source

fn set_y2_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>] ) -> &'l mut Self

Like set_x_label, but for the secondary Y axis

source

fn set_cb_label<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>] ) -> &'l mut Self

Like set_x_label, but for the color bar

source

fn set_title<'l>( &'l mut self, text: &str, options: &[LabelOption<&str>] ) -> &'l mut Self

Set 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
source

fn label<'l>( &'l mut self, text: &str, x: Coordinate, y: Coordinate, options: &[LabelOption<&str>] ) -> &'l mut Self

Adds 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
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

Sets the properties of the ticks on the X axis.

§Arguments
  • tick_placement - Controls the placement of the ticks. Pass None to hide the ticks. Otherwise, the first tuple value controls the spacing of the major ticks (in axes units), otherwise set it to Auto to let gnuplot decide the spacing automatically. The second tuple value specifies the number of minor ticks. For logarithmic axes, non-zero values mean that the number of ticks usually equals to ceil(log_base) - 2.
  • tick_options - Array of TickOption controlling the appearance of the ticks
  • label_options - Array of LabelOption<&str> controlling the appearance of the tick labels. 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
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

Like 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

Like set_x_ticks but for the secondary X axis.

Note that by default, these are hidden.

source

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

Like set_x_ticks but for the secondary Y axis.

Note that by default, these are hidden.

source

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

Like 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

Sets ticks on the X axis with specified labels at specified positions.

§Arguments
  • ticks - The locations and labels of the added ticks. The label can contain a single C printf style floating point formatting specifier which will be replaced by the location of the tic.
  • tick_options - Array of TickOption controlling the appearance of the ticks
  • label_options - Array of LabelOption<&str> controlling the appearance of the tick labels. 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
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

Like 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

Like 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

Like 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

Like set_x_ticks_custom but for the the color bar axis.

source

fn set_x_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self

Set the range of values for the X axis.

§Arguments
  • min - Minimum X value
  • max - Maximum X value
source

fn set_y_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self

Set the range of values for the Y axis.

§Arguments
  • min - Minimum Y value
  • max - Maximum Y value
source

fn set_x2_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self

Set the range of values for the secondary X axis.

§Arguments
  • min - Minimum X value
  • max - Maximum X value
source

fn set_y2_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self

Set the range of values for the secondary Y axis.

§Arguments
  • min - Minimum Y value
  • max - Maximum Y value
source

fn set_x_reverse(&mut self, reverse: bool) -> &mut Self

Sets X axis to reverse.

§Arguments
  • reverse - Boolean, true to reverse axis, false will not reverse
source

fn set_y_reverse(&mut self, reverse: bool) -> &mut Self

Sets Y axis to reverse.

§Arguments
  • reverse - Boolean, true to reverse axis, false will not reverse
source

fn set_x2_reverse(&mut self, reverse: bool) -> &mut Self

Sets secondary X axis to reverse.

§Arguments
  • reverse - Boolean, true to reverse axis, false will not reverse
source

fn set_y2_reverse(&mut self, reverse: bool) -> &mut Self

Sets secondary Y axis to reverse.

§Arguments
  • reverse - Boolean, true to reverse axis, false will not reverse
source

fn set_cb_range( &mut self, min: AutoOption<f64>, max: AutoOption<f64> ) -> &mut Self

Set the range of values for the color bar axis.

§Arguments
  • min - Minimum Y value
  • max - Maximum Y value
source

fn set_x_log(&mut self, base: Option<f64>) -> &mut Self

Sets the X 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
source

fn set_y_log(&mut self, base: Option<f64>) -> &mut Self

Sets the Y 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
source

fn set_x2_log(&mut self, base: Option<f64>) -> &mut Self

Sets the secondary X 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
source

fn set_y2_log(&mut self, base: Option<f64>) -> &mut Self

Sets the secondary Y 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
source

fn set_cb_log(&mut self, base: Option<f64>) -> &mut Self

Sets the color bar 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
source

fn set_x_grid(&mut self, show: bool) -> &mut Self

Shows the grid on the X axis.

§Arguments
  • show - Whether to show the grid.
source

fn set_x_minor_grid(&mut self, show: bool) -> &mut Self

Shows the minor grid on the X axis.

§Arguments
  • show - Whether to show the grid.
source

fn set_y_grid(&mut self, show: bool) -> &mut Self

Shows the grid on the Y axis.

§Arguments
  • show - Whether to show the grid.
source

fn set_y_minor_grid(&mut self, show: bool) -> &mut Self

Shows the minor grid on the Y axis.

§Arguments
  • show - Whether to show the grid.
source

fn set_x2_grid(&mut self, show: bool) -> &mut Self

Shows the grid on the secondary X axis.

§Arguments
  • show - Whether to show the grid.
source

fn set_x2_minor_grid(&mut self, show: bool) -> &mut Self

Shows the minor grid on the secondary X axis.

§Arguments
  • show - Whether to show the grid.
source

fn set_y2_grid(&mut self, show: bool) -> &mut Self

Shows the grid on the secondary Y axis.

§Arguments
  • show - Whether to show the grid.
source

fn set_y2_minor_grid(&mut self, show: bool) -> &mut Self

Shows the minor grid on the secondary Y axis.

§Arguments
  • show - Whether to show the grid.
source

fn set_cb_grid(&mut self, show: bool) -> &mut Self

Shows the grid on the color bar axis.

§Arguments
  • show - Whether to show the grid.
source

fn set_grid_options<'l>( &'l mut self, front: bool, options: &[PlotOption<&str>] ) -> &'l mut Self

Set the grid options.

§Arguments
  • front - Whether the grid should be in the front of the plot elements or behind them.
  • options - Styling options of the grid. Relevant options are:
    • Color - Specifies the color of the grid lines
    • LineStyle - Specifies the style of the grid lines
    • LineWidth - Specifies the width of the grid lines
source

fn set_minor_grid_options<'l>( &'l mut self, options: &[PlotOption<&str>] ) -> &'l mut Self

Set the minor grid options.

§Arguments
  • options - Styling options of the grid. Relevant options are:
    • Color - Specifies the color of the grid lines
    • LineStyle - Specifies the style of the grid lines
    • LineWidth - Specifies the width of the grid lines
source

fn set_x_time(&mut self, is_time: bool) -> &mut Self

Sets the X axis be time.

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.
source

fn set_y_time(&mut self, is_time: bool) -> &mut Self

Sets the Y 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.
source

fn set_x2_time(&mut self, is_time: bool) -> &mut Self

Sets the secondary X axis be time.

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.
source

fn set_y2_time(&mut self, is_time: bool) -> &mut Self

Sets the secondary Y 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.
source

fn set_cb_time(&mut self, is_time: bool) -> &mut Self

Sets the color bar 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.
source

fn set_margins(&mut self, margins: &[MarginSide]) -> &mut Self

Sets the margins of the plot.

§Arguments
  • margins - The values of margins to be overriden. Specified as a fraction of the full drawing area, ranging from 0 to 1
source

fn set_palette( &mut self, palette: PaletteType<&[(f32, f32, f32, f32)]> ) -> &mut Self

Sets the palette used for 3D surface and image plots

§Arguments
  • palette - What palette type to use

Object Safety§

This trait is not object safe.

Implementors§