clear
% Enter function
%fn = @(x) x;
%fn = @(x) x.^2;
%fn = @(x) exp(x);
%fn = @(x) sin(x);
%fn = @(x) cos(x);
%fn = @(x) sqrt(x);
%fn = @(x) 1./x;
%fn = @(x) 1./(x+1)./(x-1);
%fn = @(x) 1./(x.*(1/2-x).*(x-i).*(x-i+1));
fn = @(x) sqrt(x);
fn = @(x) log(x);
for p=-4.0001:0.25:4;
t = -4: 0.05: 4;
h = p + t*i;
hold on
plot(fn(h),'k','LineWidth',1)
axis([-4,4,-4,4])
%axis([-2,2,-2,2])
axis square;
hold on
end
for p=-4.0001:0.25:4;
t = -4: 0.05: 4;
h = p*i + t;
hold on
plot(fn(h),'k:','LineWidth',1.2)
%axis([-4,4,-4,4])
axis([-2,2,-2,2])
axis square; 
set(gca,'FontSize',14)
xlabel('\itu','FontSize',14)
ylabel('\itv','FontSize',14,'Rotation',0)
hold on
end
 set(gcf, 'Color', 'w');
hold off