
Figure export to .eps in R2025a
30 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have this code which makes a figure of a headmap with the sidebar. When I export it to eps, it works fine in R2024b but in R2025a, the side bar has diagonal format of the sections instead of horizontal sections.
%% ===== Feasibility Map =====
figure;
% Define variables
feasibility_map = zeros(11) + 2;
feasibility_map(6:end, 3:end) = 1;
feasibility_map(8:end, 6:end) = 0;
targeted_caps = 0:200:2000;
global_caps = targeted_caps;
% Create the feasibility map (replace with actual data)
imagesc(targeted_caps, global_caps, feasibility_map);
% Use pastel colours: pastel green, yellow, red
colormap([119, 221, 119; 255, 250, 139; 255, 179, 186] / 255);
% Set up colour bar
colorbar('Ticks', [0.33, 1, 1.66], ...
'TickLabels', {'Both feasible', 'Only optimisation feasible', 'Both infeasible'}, ...
'FontSize', 14);
drawnow
% Label axes and title
xlabel('Targeted Platform Capacity', 'FontSize', 14, 'FontName', 'Arial');
ylabel('Global Platform Capacity', 'FontSize', 14, 'FontName', 'Arial');
title('Feasibility Comparison of Allocation Strategies', 'FontSize', 16, 'FontName', 'Arial', 'FontWeight', 'normal');
% Adjust axis
set(gca, 'YDir', 'normal');
% Use tight layout adjustment
%set(gca, 'LooseInset', max(get(gca, 'TightInset'), 0.01));
% Ticks for better readability (optional)
xticks(0:400:max(targeted_caps));
yticks(0:400:max(global_caps));
% Export settings
%set(gcf, 'PaperPositionMode', 'auto');
set(gca, 'FontName', 'Arial', 'FontSize', 14);
exportgraphics(gcf, fullfile(graphicFolder, 'feasibility_comparison.eps'), 'ContentType', 'vector', 'Resolution', 600);
0 Kommentare
Antworten (1)
Kevin Holly
am 4 Sep. 2025 um 21:50
Farid,
I was able to replicate your issue. I will inform development and look into this.
Best,
Kevin Holly
%% ===== Feasibility Map =====
figure;
% Define variables
feasibility_map = zeros(11) + 2;
feasibility_map(6:end, 3:end) = 1;
feasibility_map(8:end, 6:end) = 0;
targeted_caps = 0:200:2000;
global_caps = targeted_caps;
% Create the feasibility map (replace with actual data)
imagesc(targeted_caps, global_caps, feasibility_map);
% Use pastel colours: pastel green, yellow, red
colormap([119, 221, 119; 255, 250, 139; 255, 179, 186] / 255);
% Set up colour bar
colorbar('Ticks', [0.33, 1, 1.66], ...
'TickLabels', {'Both feasible', 'Only optimisation feasible', 'Both infeasible'}, ...
'FontSize', 14);
drawnow
% Label axes and title
xlabel('Targeted Platform Capacity', 'FontSize', 14, 'FontName', 'Arial');
ylabel('Global Platform Capacity', 'FontSize', 14, 'FontName', 'Arial');
title('Feasibility Comparison of Allocation Strategies', 'FontSize', 16, 'FontName', 'Arial', 'FontWeight', 'normal');
% Adjust axis
set(gca, 'YDir', 'normal');
% Use tight layout adjustment
%set(gca, 'LooseInset', max(get(gca, 'TightInset'), 0.01));
% Ticks for better readability (optional)
xticks(0:400:max(targeted_caps));
yticks(0:400:max(global_caps));
% Export settings
%set(gcf, 'PaperPositionMode', 'auto');
set(gca, 'FontName', 'Arial', 'FontSize', 14);
exportgraphics(gcf, 'feasibility_comparison.eps', 'ContentType', 'vector', 'Resolution', 600);
I ran the code in R2025a in dark mode and the exported graphic looked like this:

0 Kommentare
Siehe auch
Kategorien
Mehr zu Red 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!