Wrong pixel color when save figure as pdf using a different background color
Ältere Kommentare anzeigen
When I function imshow to display an image and change the default color, everything is okay. However, when I save the figure to pdf format, the color of white pixel is not correct.
set(groot, 'DefaultFigureColor', 'blue');
set(groot, 'DefaultFigureInvertHardcopy', 'off');
p = phantom();
figure(1)
imshow(p)
saveas(gcf, 'phantom.pdf');
This is the result of Figure 1.

This is the result in file 'phantom.pdf'.

1 Kommentar
N/A
am 9 Jul. 2020
I don't know if this helps you, but try export_fig . it served me well so far when I wanted to export things to pdf.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!