Octave graphic add-on, Octplot



česky

1.3 Basic graphs II - area, line, stem



Function file: area (x,y)


This function plots 2D graph similar as function plot, but area under that will be fill up. Parameters x and y must be vectors of the same length.


Examples:
x=[0.8 2.4 3.8 5.1 6.8];
y=[2 4 3.2 3.4 8.6 2.4];
area(x,y);




Function file: h = line (x,y,ARGS)


This function plots line defined by points x and y, which is vectors of the same length. It returns handle to variable h.
line(y) - values of x starts at value 1 (for first point y) and then grow for one
line(x,y) - line defined by couple x,y



Function file: h = stem (x,y,LINESPEC)


This function plots stem graf - points with stems. It returns handle to variable h.
Parameter LINESPEC - same sets as function plot.


Examples:
x=1:10;
stem(x);




other format of lines:
x=[1 2.4 3.1 4.5 6.1];
y=[2.1 1.4 3.5 3.4 1.5];
h = stem(x,y,'-.mx')




fill points:
x=[1 2.4 3.1 4.5 6.1];
y=[2.1 1.4 3.5 3.4 1.5];
h = stem(x,y,"fill")





<<< 1.2 Basic graphs I - plot 1.4 Basic graphs III - bar, barh >>>

© 2008 David Prokop