why does text change color when using saveas() or print()?

11 views (last 30 days)
Hi,
I'm having trouble saving a picture with added text in white. Eventhoug the text is shown as white (or red or which ever other color) in the matlab figure, it becomes black when i save it as a pdf using saveas() or print(). Saving in a different file format does not work either.
Img = imread('Img.tif');
h = figure;
imshow(Img);
hold on;
for j = 1:size(TextPosition,2)
text(TextPosition(j,1),TextPosition(j,2),num2str(j),'Color','w','FontWeight', 'bold');
end
saveas(gcf,'ImgWithText.pdf');
close;
TextPosition is just a list of positions where text should be added.
Does anyone know whats going on?
Best /Anne

Accepted Answer

Thorsten
Thorsten on 2 Sep 2016

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!