figure

subplot(3,1,1);
plot(0:numitersub_ub:step_count_ssg, SSG_obj_candidate(1:numitersub_ub:(step_count_ssg+1)), 'blue', ...
     0:numitersub_ub:(step_count_ippssg), IPP_SSG_obj_candidate(1:(ceil(step_count_ippssg/numitersub_ub))+1), 'red', ...
     0:numitersub_ub:(step_count_ippconex), IPP_ConEx_obj_candidate(1:(ceil(step_count_ippconex/numitersub_ub))+1), 'green')
xlabel('Iteration t')
xlim([0 step_count_ssg])
ylabel('Objective')
ylim([SSG_obj_candidate(step_count_ssg)*0.99 SSG_obj_candidate(1)*1.01])
legend({'SSG', 'IPP-SSG', 'IPP-ConEx'},'NumColumns',3,'FontSize',12)

subplot(3,1,2);
dash_line_length = step_count_ssg;
plot(0:numitersub_ub:step_count_ssg, SSG_cons_candidate(1:numitersub_ub:(step_count_ssg+1)), 'blue', ...
     0:numitersub_ub:step_count_ippssg, IPP_SSG_cons_candidate, 'red', ...
     0:numitersub_ub:step_count_ippconex, IPP_ConEx_cons_candidate, 'green', ...
     0:dash_line_length, zeros(1, dash_line_length+1), 'black--')
xlabel('Iteration t')
xlim([0 step_count_ssg])
ylabel('Feasibility')
ylim([SSG_cons_candidate(1)*1.1 -SSG_cons_candidate(1)*0.05])
legend({'SSG', 'IPP-SSG', 'IPP-ConEx'},'NumColumns',3,'FontSize',12,'Location','southeast')

subplot(3,1,3);
plot(0:numitersub_ub:step_count_ssg, SSG_stationarity_measure, 'blue', ...
     0:numitersub_ub:step_count_ippssg, IPP_SSG_stationarity_measure, 'red', ...
     0:numitersub_ub:step_count_ippconex, IPP_ConEx_stationarity_measure, 'green')
xlabel('Frequency')
xlim([0 step_count_ippssg])
ylabel('Stationarity')
legend({'SSG', 'IPP-SSG', 'IPP-ConEx'}, 'NumColumns',3,'FontSize',12)

sgtitle("Weakly Convex Constrained Minimization on " + title_name)