function beautifyBERplot() % BEAUTIFYBERPLOT Enhances a BER plot for publication-quality figures. % Set line properties for all current plot lines lines = findall(gca, 'Type', 'Line'); markers = {'o', 's', 'd', '^', 'v', '>', '<', 'p', 'h'}; % Define marker styles num_markers = length(markers); for i = 1:length(lines) lines(i).LineWidth = 1.3; % Thicker line width lines(i).LineStyle = '-'; % Solid lines for simplicity if string(lines(i).Marker) == "none" lines(i).Marker = markers{mod(i-1, num_markers) + 1}; % Assign markers cyclically end lines(i).MarkerSize = 7; % Marker size lines(i).MarkerFaceColor = lines(i).Color; % Use line color for marker face lines(i).MarkerEdgeColor = 'white'; end % Change all text interpreters to LaTeX set(findall(gca, '-property', 'Interpreter'), 'Interpreter', 'latex'); % Set figure background to white set(gcf, 'Color', 'w'); % Set logarithmic scale for y-axis, but only if it makes sense. % If this is not always desired, you could condition this on the presence of lines or data. set(gca, 'YScale', 'log'); % Customize grid and box appearance set(gca, 'Box', 'on', 'LineWidth', 0.8); % Thicker border grid on; % grid minor; % Adjust font size and style for better readability set(gca, 'FontSize', 10, 'FontName', 'Times New Roman'); end