Wissensdatenbank Wirtschaftsrecht

aktuelles Dokument: Plots
image4
image3
image2
image1
 Alle Kategorien:
  Forschungsdatenbank
  Lehrveranstaltungen
  Lexikon
  Literatur
  Rechtsgebiete
  Rechtsprechung
  Service
  Studium F H S
  Wissensmanagement
ich war hier: Plots

Version [91344]

Dies ist eine alte Version von Plots erstellt von Christian am 2018-09-24 14:17:26.

 

Einfache verschiedene Grundplots


Liniendiagramm


Einfacher Sinus

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

Multiple Linien

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

Linienvariation

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


Einfaches Säulendiagramm

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

Beschrifteter X-Achse

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

Säulendicke

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

Säulengruppierung

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

Gestapelt

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



Balkendiagramm


Einfaches Balkendiagramm

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

Beschrifteter X-Achse

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

Balkendicke

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

Balkengruppierung

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

Gestapelt

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



Histogramm


Einfache aus Zufallszahlen

x = randn(500,1);
histogram(x)

Balkenanzahl

x = randn(500,1);
nbins = 25;
histogram(x,nbins)



Histogramm - 3D


Einfache aus Zufallszahlen

x = randn(500,1);
y = randn(500,1);
histogram2(x,y)

Balkenanzahl (in jeder Dimension)

x = randn (1000,1);
y = randn (1000,1);
nbins = 5;
histogramm2 (x, y, nbins)



Kuchendiagramm


Einfaches

X = [1 2 3 4 5];
pie(X)

Explodiertes

X = [1 2 3 4 5];
explode = [0 1 0 1 0]; bei 1 ist das Kuchenstück herausgenommen
pie(X,explode)

Küchenstücke Beschriftet

X = [1 2 3 4 5];
labels = {'PIE 1', 'PIE 2', 'PIE 3', 'PIE 4', 'PIE 5'};
pie(X,labels)



Kuchendiagramm - 3D


Einfaches

X = [1 2 3 4 5];
pie3(X)

Explodiertes

X = [1 2 3 4 5];
explode = [0 1 0 1 0]; bei 1 ist das Kuchenstück herausgenommen
pie3(X,explode)

Küchenstücke Beschriftet

X = [1 2 3 4 5];
labels = {'PIE 1', 'PIE 2', 'PIE 3', 'PIE 4', 'PIE 5'};
pie3(X,labels)



Streudiagramm


Einfache Sinus mit Zufallszahlen

x = linspace(0,3*pi,200);
y = sin(x) + rand(1,200);
scatter(x,y)

Unterschiedliche Kreisgröße (wird auf X-Achse größer)

x = linspace(0,3*pi,200);
y = sin(x) + rand(1,200);
sz = linspace(1,100,200);
scatter(x,y,sz)

Unterschiedliche Kreisfarben

x = linspace(0,3*pi,200);
y = sin(x) + rand(1,200);
c = linspace(1,10,length(x));
scatter(x,y,[],c)



Streudiagramm - 3D


Einfache Sinus mit Zufallszahlen

[X,Y,Z] = sphere(16);
x = [0.5*X(:); 0.75*X(:); X(:)];
y = [0.5*Y(:); 0.75*Y(:); Y(:)];
z = [0.5*Z(:); 0.75*Z(:); Z(:)];

scatter3(x,y,z)

Unterschiedliche Kreisgröße

[X,Y,Z] = sphere(16);
x = [0.5*X(:); 0.75*X(:); X(:)];
y = [0.5*Y(:); 0.75*Y(:); Y(:)];
z = [0.5*Z(:); 0.75*Z(:); Z(:)];

S = repmat([100,50,5],numel(X),1);
s = S(:);

scatter3(x,y,z,s)
view(40,35)

Unterschiedliche Kreisfarben

[X,Y,Z] = sphere(16);
x = [0.5*X(:); 0.75*X(:); X(:)];
y = [0.5*Y(:); 0.75*Y(:); Y(:)];
z = [0.5*Z(:); 0.75*Z(:); Z(:)];

S = repmat([50,25,10],numel(X),1);
C = repmat([1,2,3],numel(X),1);
s = S(:);
c = C(:);

scatter3(x,y,z,s,c)
view(40,35)



Oberflächendiagramm


Einfach

[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
surf(X,Y,Z)

Mit Farbbar

[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
C = X.*Y;
surf(X,Y,Z,C)
colorbar


Netzdiagramm


Einfach

[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
mesh(X,Y,Z)

Spezifischer Farbe

[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin( R)./R;
C = gradient(Z);
mesh(X,Y,Z,C)



Erweiterte/Spezifische Plots


Die Daten für dieses Beispiel sind Bewegungsdaten von einem Balance Board.

Diese Seite wurde noch nicht kommentiert.
Valid XHTML   |   Valid CSS:   |   Powered by WikkaWiki