Struct rustplot::chart_builder::AxisProp [] [src]

pub struct AxisProp { /* fields omitted */ }

Structure allowing manipulation of chart axis.

Methods

impl AxisProp
[src]

[src]

Sets the upper and lower bounds (maximum and minimum value) of the x-axis. After new bounds are selected, a new scale is auto calcuated.

min is the low bound (minimum value) on the x-axis.

max is the upper bound (maximum value) on the x-axis.

Defaults are intelligently selected with use of the data provided. Any changes made to a categorical axis (e.g. bar chart) will have no effect.

Examples

use rustplot::chart_builder;

// Create instance of pie chart.
let mut xy_scatter_plot = chart_builder::XYScatterPlot::new(String::from("SCATTER CHART"), vec![vec![30.0, 50.0, 80.0]], vec![vec![35.0, 45.0, 70.0]]);

// Set axis bounds.
xy_scatter_plot.axis_prop.set_x_axis_bounds(100.0, 300.0);

[src]

Sets the upper and lower bounds (maximum and minimum value) of the y-axis. After new bounds are selected, a new scale is auto calcuated.

min is the low bound (minimum value) on the y-axis.

max is the upper bound (maximum value) on the y-axis.

Defaults are intelligently selected with use of the data provided. Any changes made to a histogram will have no effect as frequencies are calculated during drawing.

Examples

use rustplot::chart_builder;

// Create instance of pie chart.
let mut xy_scatter_plot = chart_builder::XYScatterPlot::new(String::from("SCATTER CHART"), vec![vec![30.0, 50.0, 80.0]], vec![vec![35.0, 45.0, 70.0]]);

// Set axis bounds.
xy_scatter_plot.axis_prop.set_x_axis_bounds(100.0, 300.0);

[src]

Sets the (scale) interval for numbered delimiters shown on the x-axis.

new_interval interval set bewteen each numbered delimiter on axis.

Defaults are intelligently selected with use of the data provided. It is important to use this after calling set_x_axis_bounds() as this will recalculate the scale.

[src]

Sets the (scale) interval for numbered delimiters shown on the y-axis.

new_interval interval set bewteen each numbered delimiter on axis.

Defaults are intelligently selected with use of the data provided. It is important to use this after calling set_y_axis_bounds() as this will recalculate the scale.

[src]

Sets x-axis title.

new_title the String to be displayed on the x-axis.

[src]

Sets y-axis title.

new_title the String to be displayed on the y-axis.

Trait Implementations

impl Clone for AxisProp
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for AxisProp

impl Sync for AxisProp