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

13 vues (au cours des 30 derniers jours)
Anne Jørgensen
Anne Jørgensen le 2 Sep 2016
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

Réponse acceptée

Thorsten
Thorsten le 2 Sep 2016

Plus de réponses (0)

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by