02.03.2016 Views

MATLAB by rudra pratap

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

214<br />

Graphics<br />

elf<br />

hi = axes ('posit ion ' ,[.1,.1,.5, .5]);<br />

fill (x,y, 'g')<br />

% clear previous figure settings<br />

% first axes<br />

% first (big) spiral in green<br />

h2 = axes('posit ion ' ,[.45, .45, .3, .3]); % second axes<br />

fill(x,y, 'b')<br />

% second spiral in blue<br />

set (h2 , 'xcolor ' ,'b');<br />

set (h2 , 'ycolor ' ,'b');<br />

set (h2, 'xticklabel ' ,' ');<br />

set (h2, 'yticklabel' ,' ') ;<br />

% change x-axis color to blue<br />

% change y-axis color to blue<br />

% remove axis tick marks<br />

h3 = axes('position' , [.67, .67, .2, .2]); % third axes<br />

fill(x, y, 'm'), box('of f') % third spiral , no outer box<br />

set (h3 , 'xcolor ' ,'m'); % change axis color to magenta<br />

set (h3 , 'ycolor' ,'m');<br />

set (h3, 'xticklabel ' ,' '); % remove axis tick marks<br />

set (h3, 'yticklabel ' ,' ');<br />

h4 = axes ('position' , [.84, .84, .1,.1]); % fourth axes<br />

fill (x,y, 'r')<br />

% fourth spiral in red<br />

set (h4 , 'color ' ,'y') ;<br />

% change background color<br />

set (h4 , 'xaxisloc ' , 'top '); % locate x-axis on top<br />

set (h4, 'yaxisloc ' ,'right '); % locate y-axis on right<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

-0.2<br />

-0.4<br />

-0.6<br />

0<br />

-0.8 '----'----'----'----'<br />

-1 -0.5 0 0.5<br />

Figure 6.15: Example of manipulation of axes and its various properties.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!