You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue arises because levelplot uses a fixed font size when setting the legend. When different level plots are combined into one figure and the figure is resized, the legend fonts for each subplot don't seem to adjust according to the adaptive size of the MATLAB figure window. The test results are shown in the following figure:
The likelihood of this issue occurring is low, and it can be mitigated by not setting a fixed font size, allowing MATLAB to handle it automatically. The test code is as follows:
clc, clear, clf;
This issue arises because levelplot uses a fixed font size when setting the legend. When different level plots are combined into one figure and the figure is resized, the legend fonts for each subplot don't seem to adjust according to the adaptive size of the MATLAB figure window. The test results are shown in the following figure:
The likelihood of this issue occurring is low, and it can be mitigated by not setting a fixed font size, allowing MATLAB to handle it automatically. The test code is as follows:
clc, clear, clf;
% Experimental parameter----------
Exp.mwFreq = 9.8; % 9.8404
Exp.Range = [0 900];
Exp.nPoints = 1e4;
Exp.MolFrame = [0 0 0]*pi./180;
Exp.SampleFrame = [0 0 0]; % z
% Exp.CrystalSymmetry = 141;
Exp.Harmonic = 1;
Opt.Verbosity = 2;
% ion ..............
Sys.S = 1/2;
Sys.g = [8 4 2];
Sys.lw = [2 0];
subplot(2,2,1);
[b,spc,trans] = pepper(Sys,Exp,Opt);
spc = normalize(spc,'range',[0 1]);
plot(b,spc,'linewidth',1);
axis tight;
xlabel('Magnetic field (mT)');
ylabel('Intensity (a.u.)');
subplot(2,2,2);
Ori = 'x';
Opt.SlopeColor = true;
levelsplot(Sys,Ori,Exp.Range,Exp.mwFreq,Opt);
xlabel('magnetic field (mT)');
ylabel('energy (GHz)');
subplot(2,2,3);
Ori = 'y';
Opt.SlopeColor = true;
levelsplot(Sys,Ori,Exp.Range,Exp.mwFreq,Opt);
xlabel('magnetic field (mT)');
ylabel('energy (GHz)');
subplot(2,2,4);
Ori = 'z';
Opt.SlopeColor = true;
levelsplot(Sys,Ori,Exp.Range,Exp.mwFreq,Opt);
xlabel('magnetic field (mT)');
ylabel('energy (GHz)');
The text was updated successfully, but these errors were encountered: