diff --git a/matlab/CHEASEgui/CHEASEgui.fig b/matlab/CHEASEgui/CHEASEgui.fig index 154025649e20fa296c1077ff1c2bb18451ba0ccd..7a90c2ecb6caf281ebc1197d289044d5c21778f3 100644 Binary files a/matlab/CHEASEgui/CHEASEgui.fig and b/matlab/CHEASEgui/CHEASEgui.fig differ diff --git a/matlab/CHEASEgui/CHEASEgui.m b/matlab/CHEASEgui/CHEASEgui.m index fb6afb666b031499af1804ca7f21010559e51448..d9ce615a583958fbbef8df75f482c352ca4e2651 100644 --- a/matlab/CHEASEgui/CHEASEgui.m +++ b/matlab/CHEASEgui/CHEASEgui.m @@ -37,7 +37,7 @@ function varargout = CHEASEgui(varargin) % Edit the above text to modify the response to help CHEASEgui -% Last Modified by GUIDE v2.5 11-Jun-2023 08:01:18 +% Last Modified by GUIDE v2.5 28-Apr-2025 12:24:57 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; @@ -4411,3 +4411,17 @@ function set_BAL_JEDGE_CreateFcn(hObject, eventdata, handles) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end + + +% -------------------------------------------------------------------- +function plot_nblopt_Callback(hObject, eventdata, handles) +% hObject handle to plot_nblopt (see GCBO) +% eventdata reserved - to be defined in a future version of MATLAB +% handles structure with handles and user data (see GUIDATA) + +% use last nblop results: +suffix_titles = get(handles.run_name,'String'); +bal_edge = get(handles.set_BAL_JEDGE,'string'); +suffix_titles = [suffix_titles ' jedge ' bal_edge]; +[ocols, expeqs, handles_nblopt_plot] = nblopt_plot(handles.nblopt{end}.ocols_nblopt,handles.nblopt{end}.expeqout_nblopt,suffix_titles); +figure(findobj('Tag','fig_nblopt_stable')); diff --git a/matlab/CHEASEgui/nblopt_plot.m b/matlab/CHEASEgui/nblopt_plot.m index a88b37a146d1f644de003bb0bcc24f3e4e78f19b..5d8bcf48a837a6399bf41d86d4ca62836e0d6fe0 100644 --- a/matlab/CHEASEgui/nblopt_plot.m +++ b/matlab/CHEASEgui/nblopt_plot.m @@ -73,19 +73,20 @@ ix_to_plot = [irhopol, irhopol, irhopol, irhopol, irhopol, ialpha]; iy_to_plot = [iistar, iq, ishear, ialpha, ipprime, ishear]; leg = cellstr(num2str([1:numel(ocols)]')); -n_fig = 1; +n_fig = 0; for j=1:numel(iy_to_plot) ix = ix_to_plot(j); iy = iy_to_plot(j); %% - handles_nblopt_plot.fig{2} = figure; + n_fig = n_fig + 1; + handles_nblopt_plot.fig{n_fig} = figure('Tag',ocols{i}.labels{iy}); for i=1:numel(ocols) handles_nblopt_plot.plot{i,n_fig} = plot(ocols{i}.pdata_in(:,ix),ocols{i}.pdata_in(:,iy)); hold on end xlabel(ocols{i}.labels{ix}) ylabel(ocols{i}.labels{iy}) - handles_nblopt_plot.leg{n_fig} = legend(leg); + handles_nblopt_plot.leg{n_fig} = legend(leg,'location','nw'); %% end handles_nblopt_plot.title{n_fig} = title([suffix_titles]); @@ -94,7 +95,7 @@ handles_nblopt_plot.title{n_fig} = title([suffix_titles]); ix = ialpha; iy = ishear; n_fig = n_fig + 1; -handles_nblopt_plot.fig{n_fig} = figure; +handles_nblopt_plot.fig{n_fig} = figure('Tag','fig_nblopt_stable'); for i=1:numel(ocols) iunstable = [ocols{i}.pdata_in(:,incbal) ~= 0]; aa = ocols{i}.pdata_in(:,ix); @@ -113,7 +114,7 @@ handles_nblopt_plot.title{n_fig} = title(['stable points ' suffix_titles]); % $$$ end xlabel(ocols{i}.labels{ix}) ylabel(ocols{i}.labels{iy}) -handles_nblopt_plot.leg{n_fig} = legend(leg); +handles_nblopt_plot.leg{n_fig} = legend(leg,'location','nw'); %% %% @@ -129,7 +130,7 @@ for i=2:numel(ocols) end xlabel(ocols{i}.labels{ix}) ylabel('Fmarg=P''nblopt/ref') -handles_nblopt_plot.leg{n_fig} = legend(leg{2:end}); +handles_nblopt_plot.leg{n_fig} = legend(leg{2:end},'location','nw'); axis([0 1 0 10]) handles_nblopt_plot.title{n_fig} = title([suffix_titles]); @@ -164,7 +165,7 @@ for i=1:numel(ocols) hold on end ylabel('alpha') -%legend(leg) +%legend(leg,'location','nw') xlabel('\rho_p') %[child_handles,hslice] = modsubplot([0.9 1],[],-1.3,{[0.5 4.5] [0 20] [0 3]},[],[],[],[],[0 0.12]); [handles_nblopt_plot.child_handles{n_fig},hslice] = modsubplot([0. 1],[],-1.3,{[0. 8] [-5 20] [0 10]},[],'x',[],[],[0 0.12]); @@ -205,7 +206,7 @@ for i=1:numel(ocols) end %ylabel('|dp/d\psi|_{max} stable to n=\infty') handles_nblopt_plot.text{3,n_fig} = text(0.71,-0.6,'|dp/d\psi|_{max} stable to n=\infty'); -%legend(leg) +%legend(leg,'location','nw') xlabel('\rho_\psi') %[child_handles,hslice] = modsubplot([0.9 1],[],-1.3,{[0.5 4.5] [0 20] [0 3]},[],[],[],[],[0 0.12]); [handles_nblopt_plot.child_handles{n_fig},hslice] = modsubplot([0.7 1],[],-1.32,{},[],'x',[],[],[0 -0.01]);