altmany / export_fig

A MATLAB toolbox for exporting publication quality figures
BSD 3-Clause "New" or "Revised" License
1.27k stars 365 forks source link

Export_fig ignores demcmap() and defaults to parula colormap for 2D plots(contourf for example) #389

Open mahendraK96 opened 4 months ago

mahendraK96 commented 4 months ago

When exporting a 2D plot (contourf plot for example) in vector form (PDF) or as a bitmap(PNG), demcmap is completely ignored and export reverts to "parula". This does not happen with other inbuilt colormaps ("hot" for example). Issue present in R2024a release with export_fig v3.44 MWE below.

Z = peaks;
F=figure();
ax=axes(F);
contourf(ax,Z);
%colormap(ax,"hot");
demcmap(Z,10);
cb=contourcbar;
export_fig(F,'test','-png','-pdf');
altmany commented 4 months ago

unfortunately, I do not have access to the Mapping Toolbox, so I cannot reproduce/debug this issue...