Plots here now

This commit is contained in:
Silas Oettinghaus
2026-07-15 17:54:48 +02:00
parent eef5d2f2ea
commit 9455084711
19 changed files with 1574 additions and 1474 deletions

View File

@@ -6,10 +6,12 @@ function beautifyBERplot(options)
% beautifyBERplot
% beautifyBERplot("polyfit",true,"polyorder",1)
% beautifyBERplot("polyfit",true,"fitmethod","pchip")
% beautifyBERplot("changemarkers",true)
arguments
options.logscale (1,1) logical = 1
options.setmarkers (1,1) logical = 1
options.changemarkers (1,1) logical = 0
options.setcolors (1,1) logical = 1
options.polyfit (1,1) logical = 0
options.polyorder (1,1) double = 2
@@ -42,9 +44,11 @@ if n > 0
end
end
markers = {'o','s','o','o','^','v','d','>'};
lw = 0.8;
ms = 2;
% Simple marker set that exports cleanly with common MATLAB-to-TikZ workflows.
markers = {'o','square','diamond','^','v','>','<','pentagram'};
lw = 1;
ms = 5;
applyMarkers = options.setmarkers || options.changemarkers;
% ---------------------------------------------------------
% Apply line/scatter + marker styling
@@ -59,8 +63,8 @@ for i = 1:n
dataObj.Color = cmap(i,:);
end
if options.setmarkers
if strcmp(dataObj.Marker,'none')
if applyMarkers
if options.changemarkers || strcmp(dataObj.Marker,'none')
dataObj.Marker = markers{mod(i-1,numel(markers))+1};
end
dataObj.MarkerSize = ms;
@@ -80,11 +84,11 @@ for i = 1:n
end
end
if options.setmarkers
if strcmp(dataObj.Marker,'none')
if applyMarkers
if options.changemarkers || strcmp(dataObj.Marker,'none')
dataObj.Marker = markers{mod(i-1,numel(markers))+1};
end
dataObj.SizeData = ms^2;
dataObj.SizeData = ms;
end
end
end