text objects shift when printed in r2012a

Hi,
In R2012a (7.14.0.739, win32), the position of certain text objects printed to file depends on the dpi used to print. At 96 dpi, the text objects are printed as rendered in matlab, but at 192 dpi, are shifted significantly. It only seems to affect two of the three text objects included.
Thanks for any ideas, best, Luke
if true
figure
set(gcf,'paperPositionMode','auto')
hold on
quiver(47.7,23.2, 1,0,0,'color','k','linewidth',2,'maxheadsize',(100/hypot_custom(narr_var2(t_).*1/5,narr_var5(t_).*1/5)).^2)
text(0.02,0.98,['2005.12.12'],'horiz','left', 'vert','top','units','norm','fontunits','norm','fontsize',0.12,'fontweight','bold')
text(47.7,23.3,['5m s^-^1'] ,'horiz','left', 'vert','bot', 'fontunits','norm','fontsize',0.10,'fontweight','bold')
text(46.2,23.3,['200 km' ] ,'horiz','center','vert','bot', 'fontunits','norm','fontsize',0.10,'fontweight','bold');
set(gca,'xlim',[45 49],'ylim',[23 27],'box','on')
a(1)=plot(gca,[45.2227 47.1773],[23.2 23.2],'k','linewidth',2);
hold off
print('-dtiff','-r192','-opengl',[ 'print192dpi.tif']);
print('-dtiff','-r96' ,'-opengl', [ 'print96dpi.tif']);
end

1 Comment

By the way, why do you tend to start your code with "if true" ?

Answers (0)

This question is closed.

Asked:

on 19 Jul 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!