<< qqplot Graphics Logistic Regression >>

Stixbox >> Stixbox > Graphics > stairs

stairs

Stairstep graph

Calling Sequence

stairs(y)
stairs(x,y)

Parameters

x :

a matrix of doubles

y :

a matrix of doubles

Description

stairs(y) plots the stairstep graph of y.

stairs(x,y) plots the stairstep graph of x and y.

Examples

// stairs(y), y a row vector
x = linspace(0,4*%pi,40);
y = sin(x);
scf();
stairs(y)

// stairs(y), y a matrix
// Plot several stairstep graphs
x = linspace(0,4*%pi,50)';
y = [0.5*cos(x), 2*cos(x)];
scf();
stairs(y);

// stairs(x,y)
x = linspace(0,4*%pi,40);
y = sin(x);
scf();
stairs(x,y)

// Plot the empirical CDF of exponential
// random numbers
n=10000;
y=(1:n)/n;
lambda=1;
R=rexpweib(n,lambda);
x=gsort(R,"g","i");
scf();
stairs(x,y);
xlabel("x");
ylabel("P(X<x)");
title("Exponential random numbers, lambda=1")

Authors


Report an issue
<< qqplot Graphics Logistic Regression >>