clear all

%
% example 1
%
figure(1)

x=-1.5:.1:3;
y=(1-x.^2).*(x-2).^2;
plot(x,y,'r-','linewidth',3)
hold on
plot([0 0],[-6 6],'b-')
plot([-1.3 3],[0 0],'k-','linewidth', 3)
axis([-1.3 3 -6 6])
plot([-1],[0],'k.', 'markersize', 28)
plot([1 2],[0 0], 'w.', 'markersize', 28)
plot([1 2],[0 0], 'ko', 'markersize', 10)

frame off

%
% example 2
%
figure(2)

x=-.5:.1:1.5;
y=x>^2-x;
plot(x,y,'r-','linewidth',3)
hold on
plot([0 0],[-1.5 1.5],'b-')
plot([-.5 1.5],[0 0],'k-','linewidth', 3)
axis([-.5 1.5 -.3 .3])
plot([0],[0],'k.', 'markersize', 28)
plot([1],[0], 'w.', 'markersize', 28)
plot([1],[0], 'ko', 'markersize', 10)

frame off