trouble with latex font labels and legends when importing tiff figure on word 2010 or LyX

Hi - I am trying to create labels and legends with overbar and square root symbols. In matlab figure window they look like very good but when i save in .tiff or other formats and i import it on word 2010 or LyX, the distance between overbar or square root symbol and letter become very small up to coincide with the upper edge of the char. Please, can anyone help me
Many thanks, Lorenzo

3 Comments

How did you save the figure? Did you use saveas or print? Did you specify the print device?
Which operating system are you using, and which MATLAB version?
Have you tried using export_fig from the FEX ?
I'm very sorry i've seen your questions just now,i'm using W 7 Sp1 with Matlab R2012a 64
I use saveas and print in the manner listed in the script here i've not used export_fig because in the past i've encounter problems to obtain hi resolution image....Many Thanks for your help
%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%
figure('Name','plot-CoVAR_plus_y_d99 ','NumberTitle','off','Units','centimeters',...
'Position',[5 5 10 8])
RECT = [0.13,0.18, 0.8, 0.75];
x=axes('position', RECT);
set(gcf,'CurrentAxes',x)
set(gca,'XLim',[0 2.5]);
set(gca,'YLim',[-0.2 1.2]);
set(gca,'YTick',[ -0.2 0 0.2 0.4 0.6 0.8 1.0 1.2])
hold on
plot(Y_3DHW_f/Y99_3DHW_f,-uwcov_plus_3DHW_f,'kd','markersize',4);
hold on
plot(Y_3DHW_nf/Y99_3DHW_nf,-uwcov_plus_3DHW_nf,'kd','markersize',4,'MarkerFaceColor','k');
hold on
plot(Y_3DHW_f/Y99_3DHW_f,uvcov_plus_3DHW_f,'kv','markersize',4);
hold on
plot(Y_3DHW_nf/Y99_3DHW_nf,uvcov_plus_3DHW_nf,'kv','markersize',4,'MarkerFaceColor','k');
hold on
plot(Y_3DHW_f/Y99_3DHW_f,wvcov_plus_3DHW_f,'k^','markersize',4);
hold on
plot(Y_3DHW_nf/Y99_3DHW_nf,wvcov_plus_3DHW_nf,'k^','markersize',4,'MarkerFaceColor','k');
hleg1=legend('3C-HW f','3C-HW nf','3C-HW f','3C-HW nf','3C-HW f','3C-HW nf');
box on
% %Axis Label
ylabel('-$$\overline{uw}$$ $$^{+}$$ $${}$$ $$(\diamondsuit)$$ $${}$$ $$\overline{uv}$$ $$^{+}$$ $${}$$ $$( \bigtriangledown)$$ $${}$$ $$\overline{vw}$$ $$^{+}$$ $${}$$ $$( \bigtriangleup)$$','interpreter','latex','FontSize',8,'VerticalAlignment',' top','FontName','Times New Roman')
xlabel('$$\it{z}$$/$${\delta_{99}} $$ ','interpreter','latex','FontSize',8,'VerticalAlignment',' top','FontName','Times New Roman')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Axis Label Position
ylabh = get(gca,'YLabel');
ydeltay=(1.4)/100;
set(ylabh,'Position',get(ylabh,'Position') + [-3*ydeltay (-3.5*ydeltay) 0]);
xlabh = get(gca,'XLabel');
deltay=(max(6)-min(-0.2))/(100);
set(xlabh,'Position',get(xlabh,'Position') - [0 (1*deltay) 0]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Legend Position
set(hleg1,'Location','NorthEast')
set(hleg1,'interpreter','latex','FontSize',8,'FontName','Times New Roman');
legendshrink
legend boxoff
outerposition = get(hleg1, 'OuterPosition');
delta_h = 0.25*outerposition(4);
outerposition(1) = outerposition(1) - delta_h/2;
outerposition(3) = outerposition(3) - delta_h/2;
outerposition(2) = outerposition(2) - delta_h;
outerposition(4) = outerposition(4) + delta_h;
set(hleg1, 'OuterPosition', outerposition)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%Title Position
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
set(0,'defaultAxesFontSize',10,'defaultAxesFontName','Times New Roman')
set(gcf, 'Color', 'w');
set(gcf,'PaperPositionMode','auto')
%
print -dtiff -r600 'C:\Users\Lorenzo\Documents\Lorenzo_DATA_Asys\Comparison\BL22\carpeta\plot_3HW-CoVAR_plus_y_d99_2D_PIV.tiff'
saveas(gcf,'C:\Users\Lorenzo\Documents\Lorenzo_DATA_Asys\Comparison\BL22\carpeta\plot_3HW-CoVAR_plus_y_d99_2D_PIV.fig')
hold off
%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
figure('Name','plot_uvar_plus_y_plus ','NumberTitle','off','Units','centimeters',...
'Position',[5 5 10 8])
RECT = [0.13,0.18, 0.8, 0.75];
x=axes('position', RECT);
set(gcf,'CurrentAxes',x)
set(gca,'XScale','log');
set(gca,'XLim',[100 30000]);
set(gca,'YLim',[-0.2 7]);
hold on
%
% semilogx(y_plus,uvar_mat_plus,'ko','MarkerSize',4)
hold on
% semilogx(y_plus,wvar_mat_plus,'kv','MarkerSize',4)
hold on
% semilogx(y_plus,-uwcov_mat_plus,'kd','MarkerSize',4)
hold on
% semilogx(y_plus,vvar_mat_plus,'k+','MarkerSize',4)
hleg1=legend('$$\overline{u^{_2}}^{+}$$','$$\overline{w^{_2}}^{+}$$','-$$\overline{uw}^{+}$$','$$\overline{v^{_2}}^{+}$$');
box on
%Axis Label
ylabel(({ '$${\overline{u^{_2}}}^+$$ {} $${\overline{w^{_2}}}^+$$ {} -$${\overline{uw}}^+$$ {} $${\overline{v^{_2}}}^+$$ '}),'HorizontalAlignment','right','interpreter','latex','FontSize',8,'FontName','Times New Roman')
xlabel('$$\it{z^{+}} $$ ','interpreter','latex','FontSize',8,'VerticalAlignment',' top','FontName','Times New Roman')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Axis Label Position
ylabh = get(gca,'YLabel');
ydeltay=(7-(-0.2))/100;
set(ylabh,'Position',get(ylabh,'Position') + [0 (25*ydeltay) 0]);
xlabh = get(gca,'XLabel');
deltay=(max(uvar_mat_plus)-min(uvar_mat_plus))/(100);
set(xlabh,'Position',get(xlabh,'Position') - [0 (1*deltay) 0]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Legend Position
set(hleg1,'Location','NorthEast')
set(hleg1,'interpreter','latex','FontSize',8,'FontName','Times New Roman');
outerposition = get(hleg1, 'OuterPosition');
delta_h = 0.25*outerposition(4);
outerposition(2) = outerposition(2) - delta_h;
outerposition(4) = outerposition(4) + delta_h;
set(hleg1, 'OuterPosition', outerposition)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %Title Position
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
set(0,'defaultAxesFontSize',10,'defaultAxesFontName','Times New Roman')
set(gcf, 'Color', 'w');
set(gcf,'PaperPositionMode','auto')
print -dtiff -r600 'C:\Users\Lorenzo\Documents\Lorenzo_DATA_Asys\3D\BL_3D_22Hz\no_filt\carpeta\plot_uvar_plus_y_plus.tiff'
saveas(gcf,'C:\Users\Lorenzo\Documents\Lorenzo_DATA_Asys\3D\BL_3D_22Hz\no_filt\carpeta\plot_uvar_plus_y_plus.fig')
hold off

Sign in to comment.

 Accepted Answer

Use .emf for word if possible and try .ps for Lyx.

3 Comments

Hi ChristianW ...ok it's look like better ;) but it's positioned in A4 paper...i need to modify paper size? it's possible? thanks
Ah right, I forgot about that. I don't know if it's possible to change the paper format at postscript prints.
You can change the papersize at pdf prints:
figure('PaperPositionMode','auto','PaperSize',[14 11])
title('$\overline{X} + \sqrt{Z}$','interpreter','latex')
print -dpdf test_label2
Hi ChristianW, thanks very much at pdf print i've obteined the best results :D

Sign in to comment.

More Answers (0)

Categories

Find more on Printing and Saving in Help Center and File Exchange

Products

Asked:

on 11 Mar 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!