% Demo of selected graphics commands

close all       % Close all currently opened figure windows
figure          % Start a figure window
axis equal off  % Use equal scaling on x- and y-axes; hide axes
                %   If axes are not equal, a circle shows as an ellipse
                %   Axes off looks nice; axes on makes testing easier

hold on         % Subsequent graphics commands draw on top of current
                %   graphics in the figure window

a=[0 2 2 0 0];
b=[0 0 1 1 0];
plot(a,b,'-r')  % Plot as red line

c=[1  4  5 1];
d=[.5 .5 2 2];
fill(c,d,'y')   % Draw a filled polygon in yellow

k=1;
title(sprintf('title area %d',k), 'Fontsize',14)

[x,y]= ginput(1);  % Get one mouse click's coordinates (inside axes area)
text(x,y, 'You clicked here')

hold off  % Subsequent graphics commands replace current graphics in 
          %   the figure window (old graphic is erased)

%%%%% READ Module 1 Part 3 Examples for more info! %%%%%