Axis font overlaps with axis line following .eps plot export
Show older comments
Good day everyone,
I plot in the following way:
fig = figure('Units','centimeters','PaperSize',[21 29.7], 'Position', [2, 2, 15.59, 8.94]);
ax1=axes;
subplot(1,1,1);
hold on
plot(ax1, Time, Master_I, 'LineWidth',1,'DisplayName','$I_{M}$','Color',"#D95319", LineStyle="-")
plot(ax1, Time, Slave1_I, 'LineWidth',1,'DisplayName','$I_{S1}$','Color',"#0072BD", LineStyle="--")
plot(ax1, Time, Slave2_I, 'LineWidth',1,'DisplayName','$I_{S2}$','Color',"#7E2F8E", LineStyle="--")
plot(ax1, Time, Slave3_I, 'LineWidth',1,'DisplayName','$I_{S3}$','Color',"#77AC30", LineStyle="--")
plot(ax1, Time, Slave4_I, 'LineWidth',1,'DisplayName','$I_{S4}$','Color',"#A2142F", LineStyle="--")
plot(ax1, Time, Slave5_I, 'LineWidth',1,'DisplayName','$I_{S5}$','Color',"#00FFFF", LineStyle="--")
plot(ax1, Time, I_total, 'LineWidth',1,'DisplayName','$I_{tot}$','Color',"k", LineStyle="-.")
ylabel('Current / A', 'Fontsize', 10, 'FontName', 'Latin Modern Roman', 'Interpreter', 'latex')
ylim ([-2.5 2.5])
yticks (-10:0.5:50)
hold off
grid on
xlabel('Time / h', 'Fontsize', 10, 'FontName', 'Latin Modern Roman', 'Interpreter', 'latex')
xlim ([0 6.2])
set (ax1, 'Fontsize', 10, 'FontName', 'Latin Modern Roman', 'YColor', "k", 'Box','on')
legend ('Fontsize', 10, 'FontName', 'Latin Modern Roman', 'NumColumns', 2, 'Interpreter', 'latex');
set(gca,'Box','on')
set(gcf,'renderer','Painters')
set(findall(gcf,'-property','FontSize'),'FontSize',10)
set(findall(gcf,'-property','FontName'),'FontName','Latin Modern Roman')
set(findall(gcf,'-property','Interpreter'),'Interpreter','latex')
Once in the plot window I save the plot (File --> Save As..), I obtain the following as .eps (left) and as .png (rigth):

My problem is that the axis numbering overlap with the y-axis line in .eps, and this seems to be related to the export in this particular format which I need :( Any suggestion?
Thank you for taking your time to read and understad.
Accepted Answer
More Answers (0)
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
