<< Graphics Graphics boxplot >>

Stixbox >> Stixbox > Graphics > Tutorial

Tutorial

Demos of the graphics.

Purpose

The goal of this document is to present the graphics available in this toolbox.

Scatter plot matrix

In the script below, we consider a model with 3 inputs and 3 outputs. Then we plot Y versus X.

m=1000;
x1=distfun_unifrnd(0,1,m,1);
x2=distfun_unifrnd(0,1,m,1);
x3=distfun_unifrnd(0,1,m,1);
y1=2*x1.*x2+x3;
y2=-3*x1+x2.^2-2*x3;
y3=sin(x1)-3*x2+3*x3;
x=[x1,x2,x3];
y=[y1,y2,y3];
xlabels=["X1","X2","X3"];
ylabels=["Y1","Y2","Y3"];
scf();
plotmatrix(x,y,"xlabels",xlabels,"ylabels",ylabels);

The previous script produces the following output.

In the script below, we consider a model with 3 inputs and 3 outputs. Then we plot X versus X, with histograms on the diagonal.

m=1000;
x1=distfun_unifrnd(0,1,m,1);
x2=distfun_unifrnd(0,1,m,1);
x3=distfun_unifrnd(0,1,m,1);
y1=2*x1.*x2+x3;
y2=-3*x1+x2.^2-2*x3;
y3=sin(x1)-3*x2+3*x3;
y=[y1,y2,y3];
ylabels=["Y1","Y2","Y3"];
scf();
plotmatrix(y,"xlabels",ylabels);

The previous script produces the following output.

Histogram

In the script below, we create a sample of 10000 random numbers from the chi-square distribution with 3 degrees of freedom. Then we plot the histogram.

x=distfun_chi2rnd(3,1000,1);
scf();
histo(x);
xtitle("Chi-Square random numbers","X","Frequency")

The previous script produces the following output.

QQ-plot

In the script below, we create two samples of 100 random numbers from the Poisson distribution. Then we create the QQ-plot.

x = distfun_poissrnd(10,100,1);
y = distfun_poissrnd(5,100,1);
scf();
qqplot(x,y);
xtitle("n=100","Quantile Poiss(10)","Quantile Poiss(5)");

The previous script produces the following output.


Report an issue
<< Graphics Graphics boxplot >>