Quantcast
Channel: سیم پاور »نمودارهای خاص
Viewing all articles
Browse latest Browse all 3

نمودار میله ای در متلب

$
0
0

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب :

با استفاده از دستور barh در متلب، می توانیم یک نمودار میله ای (bar graph) افقی رسم کنیم. نمودار میله ای افقی را می توانیم به شکل های مختلفی رسم کنیم که در ادامه، خود مثال های نرم افزار متلب را ذکر می کنیم.

مثال :

 

clear all
close all
clc

y = [75.995 91.972 105.711 123.203 131.669 ...
150.697 179.323 203.212 226.505 249.633 281.422];
figure;
barh(y);

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

مثال :

در کد زیر، پهنای هر میله (bar) را برابر 0.4 قرار می دهیم :

 

clear all
close all
clc

y = [75.995 91.972 105.711 123.203 131.669 ...
150.697 179.323 203.212 226.505 249.633 281.422];
figure;
barh(y,0.4);

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

مثال :

 

clear all
close all
clc

y = [75.995 91.972 105.711 123.203 131.669 ...
150.697 179.323 203.212 226.505 249.633 281.422];
figure;
subplot(2,2,1); barh(y,'grouped');
subplot(2,2,2); barh(y,'stacked');
subplot(2,2,3); barh(y,'hist');
subplot(2,2,4); barh(y,'histc');

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

مثال :

 

clear all
close all
clc

y = [75.995 91.972 105.711 123.203 131.669 ...
150.697 179.323 203.212 226.505 249.633 281.422];
figure;
barh(y,'r')

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

مثال :

 

clear all
close all
clc

y = [75.995 91.972 105.711 123.203 131.669 ...
150.697 179.323 203.212 226.505 249.633 281.422];
figure;
barh(y,'g','EdgeColor',[1 0.5 0.5]);

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

مثال :

 

clear all
close all
clc

y = [75.995 91.972 105.711 123.203 131.669 ...
150.697 179.323 203.212 226.505 249.633 281.422];
x = [1900:10:2000];
figure;
barh(x,y);

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

مثال :

 

clear all
close all
clc

a = -2.9:0.2:2.9;
barh(a,exp(-a.*a),'r')

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

مثال :

 

clear all
close all
clc

load count.dat;
yMat = count(1:6,:);
figure;
barh(yMat);

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

مثال :

 

clear all
close all
clc

load count.dat;
yMat = count(1:6,:);
figure;
hMulti = barh(yMat);
set(hMulti,'LineWidth', 2, 'LineStyle',':');

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

مثال :

 

clear all
close all
clc

Y = randn(3,5);
h = barh(Y);
set(get(h(1),'BaseLine'),'LineWidth',2,'LineStyle',':')
colormap summer % Change the color scheme

نتیجه :

رسم نمودار میله ای (bar graph) افقی، با دستور barh در متلب

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب :

با استفاده از دستور bar3 در متلب، می توانیم یک نمودار میله ای (bar graph) عمودی سه بعدی را رسم کنیم. نمودار میله ای عمودی سه بعدی را می توانیم به شکل های مختلفی رسم کنیم که در ادامه، خود مثال های نرم افزار متلب را ذکر می کنیم.

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3(y,'detached');

نتیجه :

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3(y,0.5,'detached');

نتیجه :

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;

subplot(1,2,1);
bar3(y,'detached');
title('Detached');

subplot(1,2,2);
bar3(y,0.5,'detached');
title('Width = 0.5');

نتیجه :

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3(y,'grouped');

نتیجه :

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3(y,0.25,'grouped');

نتیجه :

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;

subplot(1,2,1);
bar3(y,'grouped');
title('Grouped');

subplot(1,2,2);
bar3(y,0.25,'grouped');
title('Width = 0.25');

نتیجه :

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3(y,'stacked');

نتیجه :

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3(y,0.25,'stacked');

نتیجه :

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;

subplot(1,2,1);
bar3(y,'stacked');
title('Stacked');

subplot(1,2,2);
bar3(y,0.25,'stacked');
title('Width = 0.25');

نتیجه :

رسم نمودار میله ای (bar graph) عمودی به صورت سه بعدی، با دستور bar3 در متلب

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب :

با استفاده از دستور bar3h در متلب، می توانیم یک نمودار میله ای (bar graph) افقی سه بعدی را رسم کنیم. نمودار میله ای افقی سه بعدی را می توانیم به شکل های مختلفی رسم کنیم که در ادامه، خود مثال های نرم افزار متلب را ذکر می کنیم.

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3h(y,'detached');

نتیجه :

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3h(y,0.5,'detached');

نتیجه :

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;

subplot(1,2,1);
bar3h(y,'detached');
title('Detached');

subplot(1,2,2);
bar3h(y,0.5,'detached');
title('Width = 0.5');

نتیجه :

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3h(y,'grouped');

نتیجه :

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3h(y,0.25,'grouped');

نتیجه :

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;

subplot(1,2,1);
bar3h(y,'grouped');
title('Grouped');

subplot(1,2,2);
bar3h(y,0.25,'grouped');
title('Width = 0.25');

نتیجه :

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3h(y,'stacked');

نتیجه :

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;
bar3h(y,0.25,'stacked');

نتیجه :

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب

مثال :

clear all
close all
clc

load count.dat;
y = count(1:10,:); % Loading the dataset creates a variable 'count'
figure;

subplot(1,2,1);
bar3h(y,'stacked');
title('Stacked');

subplot(1,2,2);
bar3h(y,0.25,'stacked');
title('Width = 0.25');

نتیجه :

رسم نمودار میله ای (bar graph) افقی به صورت سه بعدی، با دستور bar3h در متلب

The post نمودار میله ای در متلب appeared first on سیم پاور.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images