Basic command for figure control

axis

      အချိူ့သော ပုံများသည် axis ၏ သက်ရောက်မှု ကြောင့် ပုံများ အပြောင်းအလဲများဖြစ်သွားနိုင်သည်။ထို့ကြောင့်  axis များကို လိုအပ်သလိုပြောင်းလဲ တတ်ရမည်။

>> axis equal
>> axis tight
>> axis normals 
>> axis off
>> axis on 
>>t=0:pi/20:2*pi;
>>x=sin(t);
>>y=cos(t)
>>plot(x,y)
image
Default axis
>>axis square
image
Axis square
>>axis tight
image
Axis tight
>>axis off
image
Axis off

line style

      မျဥ်းကြောင်းများ၏ ပုံစံ အားပြောင်းလဲခြင်း သည် ရံဖန်ရံခါ ၌ အလွန်အရေးပါသည်။ MATLAB ရှိ line style command များမှာ အောက်ပါ အတိုင်းဖြစ်သည်။
‘-‘     :   solid line
‘–‘   :   dashed line
‘:’     :   dotted line
‘-.’   :  dash dot line

image
Linestyle

>>x=1:10;
>>y=2*x'*[1:5];
>>linestylematrix = {'-';'--';':';'-.';'x'};
>>h=plot(x,y);
>>set(h,'LineStyle',linestylematrix, 'Next','new')


Color Table

အသုံးများ color code များ
color ရှင်းလင်းချက်များ
black ‘k’ or ‘black’
blue ‘b’ or ‘blue’
green ‘g’ or ‘green’
yellow ‘y’ or ‘yellow’
cyan ‘c’ or ‘cyan’
magenta ‘m’ or ‘magenta
red ‘r’ or ‘red’

      ဤ command များသည် color များကို ပြောင်းလဲ ရာတွင် အသုံးဝင်သည်။


>>plot
format

>>plot(X)
>>plot(X1,Y1,...,Xn,Yn)
>>plot(X,Y,Linespec,...,Xn,Yn)
>>plot(X1,Y1,Linespec,'PropertyName', PropertyValue)
>>plot(axes_handle,X1,Y1,Linespec, 'PropertyName', PropertyValue) 

      plot command သည် MATLAB ၏ အရေးပါသော အခြေခံ command တစ်ခုဖြစ်သည်။ ၎င်း command သည် အခြေခံပုံများ ဖြစ်သော linear equation ပုံများ၊ quadratic equation နှင့်သက်ဆိုင်သောပုံများ၊ trigo function ဆိုင်ရာပုံများ ဆွဲသားရာ ၌ အသုံးဝင်သည်။

အသုံးပြုပုံ

>>%for linear equation
>> k = 0:2:20;
>>plot(k)
>>plot(k,2*k+1);
>>%for quadratic equation
>> h = 0:0.2:20;
>> plot(h,h.^2);
>>%for trigo function
>> x = 0:pi/20:2*pi;
>> plot(x,sin(x))
>> close all
>> plot(x,cos(x))

marker နှင့် color များထည့်သွင်းခြင်း
>> plot(k,’gs’)
>> plot(k,’ro’)
>> plot(k,’m+’)
>> plot(k,’b^’)

linestyle နှင့် colormarker များထည့်သွင်းခြင်း

>>plot(k,2*k+1,’–ro’)

marker အား size ပြောင်းခြင်း နှင့် FaceColor ပြောင်းခြင်း

>> plot(k,'gs')
>> h = get(gcf, 'marker')
>>set(h,'markersize',12,'markerfacecolor','r')

Posted from WordPress for Android

Leave a comment