hi,
I want to plot the group level diff2 spectra for two separate groups (old vs. young) on the same y axes to show that one group has a larger lactate peak than another. Is there any reason why simply plotting them on the same plot would not work? Anything about the way that group level data are scaled?
Thank you!
Code I use to plot:
load(‘old.mat’); MRSContA=MRSCont;
load(‘young.mat’); MRSContB=MRSCont;
%%
%diff2 spectrum is the 6th index MRSContA.overview.SubSpecNamesStruct.metab{6} colIdx =6;
specA = MRSContA.overview.Osprey.sort_data_voxel_1.GMean.mean_metab(:, colIdx);
specB = MRSContB.overview.Osprey.sort_data_voxel_1.GMean.mean_metab(:, colIdx);
seA = MRSContA.overview.Osprey.sort_data_voxel_1.GMean.sd_metab(:, colIdx)./sqrt(N_old); %standard error across number of subjects
seB = MRSContB.overview.Osprey.sort_data_voxel_1.GMean.sd_metab(:, colIdx)./sqrt(N_young);
ppmA = MRSContA.overview.Osprey.ppm_data_metab;
ppmB = MRSContB.overview.Osprey.ppm_data_metab;
figure; hold on
boundedline(ppmA, real(specA), seA, ‘r’)
boundedline(ppmB, real(specB), seB, ‘b’)