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

View File

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

View File

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

View File

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

View File

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