Reworked plots (axis labelling, legends)

This commit is contained in:
sakul-45 2021-08-02 19:15:25 +02:00
parent 8645de60d6
commit 2308482b92
6 changed files with 38 additions and 24 deletions

View File

@ -25,11 +25,11 @@ plotpanel.Units = 'Normalized';
plotpanel.Position = [.01 .06 .98 .92]; plotpanel.Position = [.01 .06 .98 .92];
%axes for plot %axes for plot
ax = axes(plotpanel); ax = axes(plotpanel);
ax.XLabel.String = 'Time';
ax.YLabel.String = 'Intensity';
%plot current data in figure with time as x axis %plot current data in figure with time as x axis
plot(ax,dataIN) plot(ax,dataIN)
axis tight xlabel(ax,'Time Points');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
%create push buttons %create push buttons
a = uicontrol(fig,'Style','pushbutton'); a = uicontrol(fig,'Style','pushbutton');
@ -91,7 +91,9 @@ uiwait(fig)
dataOUT = dataIN / max(maxima_mean); dataOUT = dataIN / max(maxima_mean);
%plotting result with time as x axis %plotting result with time as x axis
plot(ax,dataOUT) plot(ax,dataOUT)
axis tight xlabel(ax,'Time Points');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
%writing parameter %writing parameter
params.region_of_max = [left_point right_point]; params.region_of_max = [left_point right_point];
params.max_mean = maxima_mean / max(maxima_mean); params.max_mean = maxima_mean / max(maxima_mean);
@ -99,7 +101,9 @@ uiwait(fig)
function NormResetButtonPushed(~,~) function NormResetButtonPushed(~,~)
plot(ax,dataIN) plot(ax,dataIN)
axis tight xlabel(ax,'Time Points');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
end end
function NormDoneButtonPushed(~,~) function NormDoneButtonPushed(~,~)

View File

@ -26,12 +26,12 @@ plotpanel.Units = 'Normalized';
plotpanel.Position = [.01 .06 .98 .92]; plotpanel.Position = [.01 .06 .98 .92];
%axes for plot %axes for plot
ax = axes(plotpanel); ax = axes(plotpanel);
ax.XLabel.String = 'Magnetic field';
ax.YLabel.String = 'Intensity';
%plot current data in figure with field as x axis %plot current data in figure with field as x axis
dataIN_transp = dataIN.'; dataIN_transp = dataIN.';
plot(ax,dataIN_transp) plot(ax,dataIN_transp)
axis tight xlabel(ax,'Magnetic Field Points');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
%create push buttons %create push buttons
a = uicontrol(fig,'Style','pushbutton'); a = uicontrol(fig,'Style','pushbutton');
@ -102,7 +102,9 @@ uiwait(fig)
%plotting result with field as x axis %plotting result with field as x axis
dataOUT_transp = dataOUT.'; dataOUT_transp = dataOUT.';
plot(ax,dataOUT_transp) plot(ax,dataOUT_transp)
axis tight xlabel(ax,'Magnetic Field Points');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
%adjusting parameter %adjusting parameter
params.Field_Sweep = params.Field_Sweep - params.Field_Step*2*field_cut; params.Field_Sweep = params.Field_Sweep - params.Field_Step*2*field_cut;
params.Field_Start = params.Field_Start + params.Field_Step*field_cut; params.Field_Start = params.Field_Start + params.Field_Step*field_cut;
@ -116,7 +118,9 @@ uiwait(fig)
function FieldResetButtonPushed(~,~) function FieldResetButtonPushed(~,~)
plot(ax,dataIN_transp) plot(ax,dataIN_transp)
axis tight xlabel(ax,'Magnetic Field Points');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
end end
function FieldDoneButtonPushed(~,~) function FieldDoneButtonPushed(~,~)

View File

@ -24,11 +24,11 @@ plotpanel.Units = 'Normalized';
plotpanel.Position = [.01 .06 .98 .92]; plotpanel.Position = [.01 .06 .98 .92];
%axes for plot %axes for plot
ax = axes(plotpanel); ax = axes(plotpanel);
ax.XLabel.String = 'Time';
ax.YLabel.String = 'Intensity';
%plot current data in figure %plot current data in figure
plot(ax,dataIN) plot(ax,dataIN)
axis tight xlabel(ax,'Time Points');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
%create push buttons %create push buttons
a = uicontrol(fig,'Style','pushbutton'); a = uicontrol(fig,'Style','pushbutton');
@ -83,14 +83,18 @@ uiwait(fig)
end end
%plotting result %plotting result
plot(ax,dataOUT) plot(ax,dataOUT)
axis tight xlabel(ax,'Time Points');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
%writing parameter %writing parameter
params.pretrigger = pretrigger; params.pretrigger = pretrigger;
end end
function TimeResetButtonPushed(~,~) function TimeResetButtonPushed(~,~)
plot(ax,dataIN) plot(ax,dataIN)
axis tight xlabel(ax,'Time Points');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
end end
function TimeDoneButtonPushed(~,~) function TimeDoneButtonPushed(~,~)

View File

@ -11749,6 +11749,6 @@
<lw>0</lw> <lw>0</lw>
</Manual_Sys> </Manual_Sys>
<Triplett_pop>0</Triplett_pop> <Triplett_pop>0</Triplett_pop>
<Triplett_pop>0.71429</Triplett_pop> <Triplett_pop>0.66667</Triplett_pop>
<Triplett_pop>0.28571</Triplett_pop> <Triplett_pop>0.33333</Triplett_pop>
</struct> </struct>

View File

@ -27,11 +27,11 @@ plotpanel.Units = 'Normalized';
plotpanel.Position = [.01 .01 .7 .98]; plotpanel.Position = [.01 .01 .7 .98];
%axes for plot %axes for plot
ax = axes(plotpanel); ax = axes(plotpanel);
ax.XLabel.String = 'magnetic field';
ax.YLabel.String = 'Intensity';
%plot current data in figure with field as x axis %plot current data in figure with field as x axis
plot(ax,0.1*params.Field_Vector,params.max_mean,'r') plot(ax,0.1*params.Field_Vector,params.max_mean,'r')
axis tight xlabel(ax,'Magnetic Field / mT');
ylabel(ax,'EPR Signal / A. U.');
axis(ax,'tight');
%% create push buttons %% create push buttons
a = uicontrol(fig,'Style','pushbutton'); a = uicontrol(fig,'Style','pushbutton');
@ -289,8 +289,10 @@ uiwait(fig)
%plot result %plot result
plot(ax,0.1*params.Field_Vector,params.max_mean,'r',... plot(ax,0.1*params.Field_Vector,params.max_mean,'r',...
bfield,spec_norm,'b','LineWidth',1.2) bfield,spec_norm,'b','LineWidth',1.2)
legend('experimental','simulation') xlabel(ax,'Magnetic Field / mT');
axis tight ylabel(ax,'EPR Signal / A. U.');
legend(ax,'experimental','simulation');
axis(ax,'tight');
%write manual fit to params %write manual fit to params
params.Manual_Sys = Sys; params.Manual_Sys = Sys;
params.Triplett_pop = Exp.Temperature; params.Triplett_pop = Exp.Temperature;

View File

@ -49,7 +49,7 @@ spec_norm = spec/max(spec); % normalize the simulation
plot(ax,0.1*params.Field_Vector,params.max_mean,'r',... plot(ax,0.1*params.Field_Vector,params.max_mean,'r',...
bfield,spec_norm,'b','LineWidth',1.2) bfield,spec_norm,'b','LineWidth',1.2)
xlabel 'Magnetic Field / mT' xlabel 'Magnetic Field / mT'
ylabel 'EPR signal / A. U.' ylabel 'EPR Signal / A. U.'
legend('experimental','simulation') legend('experimental','simulation')
axis tight axis tight
@ -340,7 +340,7 @@ uiwait(fig)
plot(ax,0.1*params.Field_Vector,params.max_mean,'r',... plot(ax,0.1*params.Field_Vector,params.max_mean,'r',...
0.1*params.Field_Vector,BestSpc,'b','LineWidth',1.2); 0.1*params.Field_Vector,BestSpc,'b','LineWidth',1.2);
xlabel(ax,'Magnetic Field / mT'); xlabel(ax,'Magnetic Field / mT');
ylabel(ax,'EPR signal / A. U.'); ylabel(ax,'EPR Signal / A. U.');
legend(ax,'experimental','simulation'); legend(ax,'experimental','simulation');
axis(ax,'tight'); axis(ax,'tight');
%normalize Triplett population %normalize Triplett population