scatterboxplot

scatterboxplot creates scatter diagram with marginal boxplots

Syntax

  • h=scatterboxplot(x,y)example
  • h=scatterboxplot(x,y,Name,Value)example

Description

scatterboxplot displays a 2D scatter plot with marginal boxplots. It receives data in two vectors X and Y, and puts a univariate boxplot on the horizontal and vertical axes of the plot. x and y must have the same length.

example

h =scatterboxplot(x, y) A 2D scatter plot with marginal boxplots.

example

h =scatterboxplot(x, y, Name, Value) A 2D scatter plot with marginal boxplots, for grouped data.

Examples

expand all

  • A 2D scatter plot with marginal boxplots.
  • n=100;
    scatterboxplot(randn(n,1),randn(n,1))
    ans = 
    
      1×3 Axes array:
    
        Axes    Axes    Axes
    
    
    Click here for the graphical output of this example (link to Ro.S.A. website). Graphical output could not be included in the installation file because toolboxes cannot be greater than 20MB. To load locally the image files, download zip file http://rosa.unipr.it/fsda/images.zip and unzip it to <tt>(docroot)/FSDA/images</tt> or simply run routine <tt>downloadGraphicalOutput.m</tt>

  • A 2D scatter plot with marginal boxplots, for grouped data.
  • n=100; group=ones(n,1);
    group(1:50)=2; scatterboxplot(randn(n,1),randn(n,1),'Group',group)
    ans = 
    
      1×3 Axes array:
    
        Axes    Axes    Axes
    
    
    Click here for the graphical output of this example (link to Ro.S.A. website). Graphical output could not be included in the installation file because toolboxes cannot be greater than 20MB. To load locally the image files, download zip file http://rosa.unipr.it/fsda/images.zip and unzip it to <tt>(docroot)/FSDA/images</tt> or simply run routine <tt>downloadGraphicalOutput.m</tt>

    Input Arguments

    expand all

    x — Input data. Vector or 1-column matrix.

    The structure contains the univariate data to display in the x axis.

    Data Types: single| double

    y — Input data. Vector or 1-column matrix.

    The structure contains the univariate data to display in the y axis.

    Data Types: single| double

    Name-Value Pair Arguments

    Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

    Example:

    Group —A grouping variable.vector.

    Vector of group identifiers.

    With this option scatterboxplot creates a 2D GSCATTER plot instead of a SCATTER plot, and the marginal boxplots are replaced by grouped boxplots.

    Data Types - scalar

    Example:

    Data Types: scalar Example - Group,[1,1,1,2,2,2,2,2,2]

    Output Arguments

    expand all

    h —Vector of handles. Vector

    Contains the three axes handles for the scatterplot, the plot along the horizontal axis, and the plot along the vertical axis, respectively..

    Data Types - single | double.

    References

    This page has been automatically generated by our routine publishFS