why does text change color when using saveas() or print()?
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anne Jørgensen
am 2 Sep. 2016
Beantwortet: Thorsten
am 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
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!