You are on page 1of 4

STAIRS:

x = linspace(-2*pi,2*pi,40)
stairs(x,sin(x))
=========================================================
PLOT3 :
t = 0:pi/50:10*pi
o = sin(t)
p = cos(t)
plot3(o,p,t)
=========================================================
x = 1:10:100;
y = [20 30 45 40 60 65 80 75 95 90]
err = [5 8 2 9 3 3 8 3 9 3]
errorbar(x,y,err)
=========================================================
Y = [1, 5, 3;
3, 2, 7;
1, 5, 3;
2, 6, 1];
area(Y)
==========================================================
x = logspace(-1,2);
y = exp(x);
loglog(x,y,'-s')
==========================================================
x = 0:1000;
y = log(x)
semilogx(x,y)
==========================================================
x = 0:0.1:10;
y = exp(x);
semilogy(x,y)
==========================================================
xt = @(t) sin(t);
yt = @(t) cos(t);
zt = @(t) t;
fplot3(xt,yt,zt)
==========================================================
f = @(x,y) x.^2 + y.^2 - 3;
fimplicit(f,[-3 0 -2 2])
==========================================================
==========================================================
x = randn(10000,1);
h = histogram(x)
==========================================================
histogram2:
x = randn(10000,1);
y = randn(10000,1);
h = histogram2(x,y)
==========================================================
scatter
x = linspace(0,3*pi,200);
y = cos(x) + rand(1,200);
scatter(x,y)
==========================================================
scatter3
[x,y,z] = sphere(16);
X = [x(:)*.5 x(:)*.75 x(:)];
Y = [y(:)*.5 y(:)*.75 y(:)];
Z = [z(:)*.5 z(:)*.75 z(:)];
S = repmat([1 .75 .5]*10,prod(size(x)),1);
C = repmat([1 2 3],prod(size(x)),1);
scatter3(X(:),Y(:),Z(:),S(:),C(:),'filled'), view(-60,60)
===========================================================
scatterhistogram:
load patients
tbl = table(LastName,Age,Gender,Height,Weight);
s = scatterhistogram(tbl,'Height','Weight');
===========================================================
B = bucky;
spy(B)
===========================================================
plotmatrix
x = randn(50,3); y = x*[-1 2 1;2 0 1;1 -2 3;]';
plotmatrix(y,'*r')
===========================================================
heatmap
tbl = table(LastName,Age,Gender,SelfAssessedHealthStatus,...
Smoker,Weight,Location);
h = heatmap(tbl,'Smoker','SelfAssessedHealthStatus')
===========================================================
wordcloud
load sonnetsTable
head(tbl)
wordcloud(tbl,'Word','Count');
title("Sonnets Word Cloud")
===========================================================
parallelplot
tbl = table(Diastolic,Smoker,Systolic);
p = parallelplot(tbl)
===========================================================

===========================================================
bar
y = [75 91 105 123.5 131 150 179 203 226 249 281.5];
bar(y)
===========================================================
bar3
Y = cool(7);
subplot(3,2,1)
bar3(Y,'detached')
title('Detached')
===========================================================
stem
y = linspace(0,2,10);
stem(exp(-y),'fill','-.')
axis ([0 11 0 1])
===========================================================
stem3
y = linspace(0,2,10);
stem(exp(-y),'fill','-.')
axis ([0 11 0 1])
===========================================================
geobubble
tsunamis = readtable('tsunamis.xlsx');
tsunamis.Cause = categorical(tsunamis.Cause);
gb = geobubble(tsunamis,'Latitude','Longitude', ...
'SizeVariable','MaxHeight','ColorVariable','Cause')
===========================================================
geoplot
latSeattle = 47.62
lonSeattle = -122.33
latAnchorage = 61.20
lonAnchorage = -149.9
geoplot([latSeattle latAnchorage],[lonSeattle lonAnchorage],'g-*')
===========================================================
geoscatter
lon = (-170:10:170)
lat = 50 * cosd(3*lon)
A = 101 + 100*(sind(2*lon))
C = cosd(4*lon)
geoscatter(lat,lon,A,C,'^')
======================================================

FOR Pie
x=[10,20,30,40,50];
pie(x)
================================================

You might also like