MATLAB: Pixelated text in figures using text() function

2014bfigureMATLABpixelatedr2014bgraphicstext;

Hi,
The text() function when adding text to figures seems to me misbehaving. The text is noticeably pixelated when compared to all the other figure text, both on my monitor, and also when I print out to jpg, see
Any hints about settings that could fix this? How do I make the text look more like the default figure text? The pixelation becomes glaringly ugly when projected onto a big screen.

Best Answer

Ooooh! I fixed it!!
I took the text commands out of the for loop, so they're only run once, and BINGO! Smooth text! :)
Here's the let's-give-the-for-loop-less-to-do code:
figure(10); clf;
lineCol = get(gca, 'colororder');
legText{1} = 'Red legend';
legText{2} = 'Blue legend';
for nS = 1:10
pp = [];
pp{1} = plot(nS, randi(95, 1, randi(3,1)),'o', 'linewidth', 2,'color', lineCol(2,:)); grid on; hold on;
pp{2} = plot(nS, randi(95, 1, randi(3,1)),'x', 'linewidth', 1.5,'color', lineCol(1,:));
end
plot([1 10], [80 80],'k', 'linewidth', 1.5 )
t1 = text(1.5, 83, 'text(1.5, 83, ThisTest and ABCDEFGHIJKLMNOPQRSTUVXYZ)', 'fontname', 'Verdana')
text(1.5, 62, 'text(1.5, 62, ThisText and abcdefhijklmnopqrstuvxyz 123456789)', 'fontsize', 14)
xlabel('xlabel')
ylabel('ylabel');
legend([pp{1}(1) pp{2}(1)], legText, 'location','southeast')
title('Title')
print -djpeg100 texttestfig_fixed.jpg
And here's the pretty image:
Now that I think about it, I've had weird pixelations happen on LINES too, maybe that was a for-loop thing too?
Anyway, problem fixed! Sort of. :)