Skip to content

Commit 5465f08

Browse files
committed
(3.51) Fixed: figure with non-default colormap exported with default colormap in some cases (issue #389)
1 parent 4d93241 commit 5465f08

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

export_fig.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@
412412
% 06/03/25: (3.48) Fixed -transparency color artifacts, set default bgcolor tolerance of +-0.1 (issue #400)
413413
% 31/03/25: (3.49) Fixed(?) -transparency in PDF/EPS files (issue #401); override Matlab's default Title & Creator meta-data (issue #402)
414414
% 31/03/25: (3.50) Revert bad fix for issue #401
415+
% 08/07/25: (3.51) Fixed: figure with non-default colormap exported with default colormap in some cases (issue #389)
415416
%}
416417

417418
if nargout
@@ -497,7 +498,8 @@
497498
% Create an invisible legacy figure at the same position/size as the uifigure
498499
hNewFig = figure('Visible','off', 'Color',hFig.Color, ...
499500
'Units',hFig.Units, 'Position',hFig.Position, ...
500-
'MenuBar','none', 'ToolBar','none');
501+
'MenuBar','none', 'ToolBar','none', ...
502+
'Colormap',hFig.Colormap); % issue #389
501503
% Copy the uifigure contents onto the new invisible legacy figure
502504
try
503505
hChildren = allchild(hFig); %=uifig.Children;

0 commit comments

Comments
 (0)