Skip to content

Commit

Permalink
streamlines the code for assigning point markers
Browse files Browse the repository at this point in the history
  • Loading branch information
MadisonDietrich committed Apr 17, 2024
1 parent fcf6f12 commit 4aab084
Showing 1 changed file with 6 additions and 62 deletions.
68 changes: 6 additions & 62 deletions mdocean/optimization/multiobjective/pareto_curve_heuristics.m
Original file line number Diff line number Diff line change
Expand Up @@ -262,42 +262,14 @@ function pareto_curve_heuristics()

%%
function [] = lagrange_multiplier_plot(lambdaActive, ...
lambdaUpper,lambdaLower);
lambdaUpper,lambdaLower)
figure
hold on
[m,n]=size(lambdaActive)
% I'll change these later
[m,n]=size(lambdaActive);
color_cell = {'.r','or','+r','*r','xr','-r','|r','+b','ob','+b','*b','xb','-b','|b'};
for i=1:m
for j = 1:n
if rem(j,14)==1
color = '.r';
elseif rem(j,14)==2
color = 'or';
elseif rem(j,14)==3
color = '+r';
elseif rem(j,14)==4
color = '*r';
elseif rem(j,14)==5
color = 'xr';
elseif rem(j,14)==6
color = '-r';
elseif rem(j,14)==7
color = '|r';
elseif rem(j,14)==8
color = '+b';
elseif rem(j,14)==9
color = 'ob';
elseif rem(j,14)==10
color = '+b';
elseif rem(j,14)==11
color = '*b';
elseif rem(j,14)==12
color = 'xb';
elseif rem(j,14)==13
color = '-b';
else
color = '|b';
end
color = color_cell{rem(j,15)};
plot(i*100/60,lambdaActive(i,j),color,'MarkerSize',12);
end
end
Expand All @@ -321,21 +293,7 @@ function pareto_curve_heuristics()
% I'll change these later
for i=1:m
for j = 1:n
if rem(j,7)==1
color = '.r';
elseif rem(j,7)==2
color = 'or';
elseif rem(j,7)==3
color = '+r';
elseif rem(j,7)==4
color = '*r';
elseif rem(j,7)==5
color = 'xr';
elseif rem(j,7)==6
color = '-r';
else
color = '|r';
end
color = color_cell{rem(j,15)};
plot(i*100/60,lambdaLower(i,j),color,'MarkerSize',12);
end
end
Expand All @@ -358,21 +316,7 @@ function pareto_curve_heuristics()
% I'll change these later
for i=1:m
for j = 1:n
if rem(j,7)==1
color = '.r';
elseif rem(j,7)==2
color = 'or';
elseif rem(j,7)==3
color = '+r';
elseif rem(j,7)==4
color = '*r';
elseif rem(j,7)==5
color = 'xr';
elseif rem(j,7)==6
color = '-r';
else
color = '|r';
end
color = color_cell{rem(j,15)};
plot(i*100/60,lambdaUpper(i,j),color,'MarkerSize',12);
end
end
Expand Down

0 comments on commit 4aab084

Please sign in to comment.