pub struct Axes2D { /* private fields */ }Expand description
2D axes that is used for drawing 2D plots
Source§
Source
Sets the properties of the plot border
§Arguments
front- Whether or not to draw the border above or below the plot contentslocations- Which locations of the border to drawoptions- Array of PlotOption controlling the appearance of the border. Relevant options are:Color- Specifies the color of the borderLineStyle- Specifies the style of the borderLineWidth- Specifies the width of the border
Source
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
Source
Like set_x_axis but for the y axis.
Source
Adds an arrow to the plot. The arrow is drawn from (x1, y1) to (x2, y2) with the arrow point towards (x2, y2).
§Arguments
x1- X coordinate of the arrow starty1- Y coordinate of the arrow startx2- X coordinate of the arrow endy2- Y coordinate of the arrow endoptions- Array of PlotOption<&str> controlling the appearance of the arrowhead and arrow shaft. Relevant options are:ArrowType- Specifies the style of the arrow head (or an option to omit it)ArrowSize- Sets the size of the arrow head (in graph units)Color- Specifies the color of the arrowLineStyle- Specifies the style of the arrow shaftLineWidth- Specifies the width of the arrow shaft
Source
Specifies the location and other properties of the legend
§Arguments
x- X coordinate of the legendy- Y coordinate of the legendlegend_options- Array of LegendOption optionstext_options- Array of LabelOption options specifying the appearance of the plot titles. Valid options are:FontTextColorTextAlign(AlignLeft)TextAlign(AlignRight)
Source
Plot a 2D scatter-plot with lines connecting each data point
§Arguments
x- x valuesy- y 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).LineWidth- Sets the width of the lineLineStyle- Sets the style of the lineColor- Sets the color
Source
Plot a 2D scatter-plot with a point standing in for each data point
§Arguments
x- x valuesy- y 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
Source
A combination of lines and points methods (drawn in that order).
§Arguments
x- x valuesy- y valuesoptions- Array of PlotOption<&str> controlling the appearance of the plot element
Source
Plot a 2D scatter-plot with a point standing in for each data point. Additionally, error bars are attached to each data point in the X direction.
§Arguments
x- x valuesy- y valuesx_error- Errors associated with the x valueoptions- Array of PlotOption 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
Source
Plot a 2D scatter-plot with a point standing in for each data point. Additionally, error bars are attached to each data point in the Y direction.
§Arguments
x- x valuesy- y valuesy_error- Errors associated with the y 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
Source
Plot a 2D scatter-plot with a point standing in for each data point. Additionally, error bars are attached to each data point in the X and Y directions.
§Arguments
x- x valuesy- y valuesx_error- Errors associated with the x valueoptions- Array of PlotOption 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
Source
Plot a 2D scatter-plot with a point standing in for each data point and lines connecting each data point. Additionally, error bars are attached to each data point in the X direction.
§Arguments
x- x valuesy- y valuesx_error- Errors associated with the x valueoptions- Array of PlotOption 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 pointLineWidth- Sets the width of the lineLineStyle- Sets the style of the lineColor- Sets the color
Source
Plot a 2D scatter-plot with a point standing in for each data point and lines connecting each data point. Additionally, error bars are attached to each data point in the Y direction.
§Arguments
x- x valuesy- y valuesy_error- Errors associated with the y 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 pointLineWidth- Sets the width of the lineLineStyle- Sets the style of the lineColor- Sets the color
Source
Plot a 2D scatter-plot of two curves (bound by y_lo and y_hi) with a filled region between them.
FillRegion plot option can be used to control what happens when the curves intersect. If set to Above, then the y_lo < y_hi region is filled.
If set to Below, then the y_lo > y_hi region is filled. Otherwise both regions are filled.
§Arguments
x- x valuesy_lo- Bottom y valuesy_hi- Top y 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).FillRegion- Specifies the region between the two curves to fillColor- Sets the color of the filled regionFillAlpha- Sets the transparency of the filled region
Source
Plot a 2D box-plot.
Box widths are, by default set so that there are no gaps between successive boxes
(i.e. each box may have a different width). This may be adjusted with (set_box_width())Axes2D::set_box_width()
or by using the BoxWidth option.
Boxes start at the x-axis and go towards the y value of the datapoint.
§Arguments
x- x values (center of the box)y- y 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).LineWidth- Sets the width of the borderLineStyle- Sets the style of the borderBorderColor- Sets the color of the borderColor- Sets the color of the box fillFillAlpha- Sets the transparency of the box fillBoxWidth- Sets the width of each box. If not supplied, the width will use the previously set box width, or be set to the spacing of the boxes
Source
Plot a 2D box-plot with error bars using boxes of automatic width.
Box widths are, by default set so that there are no gaps between successive boxes
(i.e. each box may have a different width). This may be adjusted with (set_box_width())Axes2D::set_box_width()
or by using the BoxWidth option.
Boxes start at the x-axis and go towards the y value of the datapoint.
Each box has an error bar from y - y_delta to y + y_delta.
§Arguments
x- x values (center of the box)y- y valuesy_delta- errors in y (error bars are plotted from y - y_delta to y + y_delta)options- 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).LineWidth- Sets the width of the borderLineStyle- Sets the style of the borderBorderColor- Sets the color of the borderColor- Sets the color of the box fillFillAlpha- Sets the transparency of the box fillBoxWidth- Sets the width of each box. If not supplied, the width will use the previously set box width, or be set to the spacing of the boxes
Source
Plot a 2D box-plot with error bars.
Box widths are, by default set so that there are no gaps between successive boxes
(i.e. each box may have a different width). This may be adjusted with (set_box_width())Axes2D::set_box_width()
or by using the BoxWidth option.
Boxes start at the x-axis and go towards the y value of the datapoint.
Each box has an error bar from y - y_low to y + y_high.
§Arguments
x- x values (center of the box)y- y valuesy_low- minimum of error bary_high- maximum of error baroptions- 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).LineWidth- Sets the width of the borderLineStyle- Sets the style of the borderBorderColor- Sets the color of the borderColor- Sets the color of the box fillFillAlpha- Sets the transparency of the box fillBoxWidth- Sets the width of each box. If not supplied, the width will use the previously set box width, or be set to the spacing of the boxes
Source
Plot a 2D box-and-whisker plot.
Box widths are, by default set so that there are no gaps between successive boxes
(i.e. each box may have a different width). This may be adjusted with (set_box_width())Axes2D::set_box_width()
or by using the BoxWidth option.
§Arguments
x- x values (center of the box)box_min- minimum box y valuewhisker_min- minimum whisker y valuewhisker_max- maximum whisker y valuebox_max- maximum box y valueoptions- 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).LineWidth- Sets the width of the borderLineStyle- Sets the style of the borderBorderColor- Sets the color of the borderColor- Sets the color of the box fillFillAlpha- Sets the transparency of the box fillWhiskerBars- Sets the width of the whisker barsBoxWidth- Sets the width of each box. If not supplied, the width will use the previously set box width, or be set to the spacing of the boxes
Source
Plot 2D rectangular boxes - usually used for error bars - using specified by width (x_delta) and height (y_delta).
§Arguments
x- x values (horizontal center of the box)y- y values (vertical center of the box)x_delta- Error in x (horizontal half-width of the box)y_delta- Error in y (vertical half-width of the box)options- 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).LineWidth- Sets the width of the borderLineStyle- Sets the style of the borderBorderColor- Sets the color of the borderColor- Sets the color of the box fillFillAlpha- Sets the transparency of the box fill
Source
Plot 2D rectangular boxes - usually used for error bars - using specified low and high limits for x and y.
§Arguments
x- x values (horizontal center of the box)y- y values (vertical center of the box)x_low- Horizontal lower limit of the boxx_high- Horizontal upper limit of the boxy_low- Vertical lower limit of the boxy_high- Vertical upper limit of the boxoptions- 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).LineWidth- Sets the width of the borderLineStyle- Sets the style of the borderBorderColor- Sets the color of the borderColor- Sets the color of the box fillFillAlpha- Sets the transparency of the box fill
Source
Draws an image from a rectangular array of data by connecting the individual datapoints with polygons.
#Arguments:
mat- Row-major 2D array signifying the value 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<&str> controlling the appearance of the surface. Relevant options are:Caption- Specifies the caption for this dataset. Use an empty string to hide it (default).