Why SAVEAS function saves the created image with different colors?

I try to plot multiple images, which are intensity color maps and then save them as separate files. The saved image is then different from the one in the pop-up window. it seems like the color scale is changed from jet to parula. Any ideas how to resolve this? Manual saving doesn't work for 1000 images and 'PaperPositionMode' didn't do its job as described in MathLab Answers.
for i = 1:time
colormap jet;
figure
imagesc(x_nm(:), y_nm(:), E_x(:,:,i));
set(gcf, 'PaperPositionMode', 'auto')
colorbar;
set(gca,'FontSize',18);
set(gca,'xtick',[])
set(gca,'ytick',[])
fname = sprintf('int_map_at_%d', i);
saveas(gcf,fname,'png')
end

Réponses (0)

Question posée :

OA
le 26 Nov 2018

Modifié(e) :

OA
le 26 Nov 2018

Community Treasure Hunt

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

Start Hunting!

Translated by