set(0,'defaulttextinterpreter','none')
thirdParty = '..\graphics\3rdparty\';


%illustration 1 
%straightforward use of laprint
%--------------
fileName = 'laprint';
theta = -pi:.1:pi;
y = sin(theta)./cos(theta);
plot(theta,y)
xlabel('$\theta$'); ylabel('$y$')
text(-1,20,'\LaTeX')
set(gca,'XTick',-pi:pi/2:pi)
set(gca,'XTickLabel',{'$-\pi$','$-\frac{\pi}{2}$','0', ...
                      '$\frac{\pi}{2}$','$\pi$'})
title('$y(\theta) = \frac{\sin \theta}{\cos \theta}$')
%pause
laprint(1, [thirdParty fileName], 'width', 5.5, 'factor', .45) % Use LaPrint to save figure
uploadEpsToImgSrc(fileName);
clear fileName;



%illustration 2 
%bitmap to eps with matlab's print command + no ticks
%--------------
fileName = 'bitmapWithPrint.eps';
set(0,'defaulttextinterpreter','latex')
theta = -pi:.1:pi;
y = sin(theta)./cos(theta);
plot(theta,y)
xlabel('$\theta$'); ylabel('$y$')
text(-1,20,'\LaTeX')
set(gca,'XTick',-pi:pi/2:pi)
set(gca,'XTickLabel',{'$-\pi$','$-\frac{\pi}{2}$','0', ...
                      '$\frac{\pi}{2}$','$\pi$', 'Interpreter', 'latex'})
title('$y(\theta) = \frac{\sin \theta}{\cos \theta}$')
print ('-deps2c',[thirdParty fileName])
set(0,'defaulttextinterpreter','none')
uploadEpsToImgSrc(fileName);
clear fileName;



%--------------------
%end of illustrations

%close all;