Version [91339]
Dies ist eine alte Version von Plots erstellt von Christian am 2018-09-24 13:34:54.
Einfache verschiedene Grundplots
Liniendiagramm

x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)

x = linspace(-2*pi,2*pi);
y1 = sin(x);
y2 = cos(x);
plot(x,y1,x,y2)

x = 0:pi/100:2*pi;
y1 = sin(x);
y2 = sin(x-0.25);
y3 = sin(x-0.5);
plot(x,y1,x,y2,'--',x,y3,':')
Säulendiagramm

y = [10 15 20 30 22];
bar(y)

x = 1900:10:2000;
y = [10 15 20 30 22];
bar(x,y)

y = [10 15 20 30 22];
bar(y,0.5)

y = [1 2 3; 4 5 6; 7 8 9; 10 11 12];
bar(y)

y = [1 5 9; 2 6 10; 3 7 11; 4 8 12];
bar(y,'stacked')
Balkendiagramm

y = [10 15 20 30 22];
barh(y)

x = 1900:10:2000;
y = [10 15 20 30 22];
barh(x,y)

y = [10 15 20 30 22];
barh(y,0.5)

y = [1 2 3; 4 5 6; 7 8 9; 10 11 12];
barh(y)

y = [1 5 9; 2 6 10; 3 7 11; 4 8 12];
barh(y,'stacked')