Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
f589453
Create PositionInformationContent_SM.m
May 2, 2019
115f5bc
Update PositionInformationContent_SM.m
May 3, 2019
ed6c1e2
Create PositionInformationFval_SM.m
May 9, 2019
8ab61ac
Update PositionInformationContent_SM.m
May 9, 2019
9b35dc8
Update PositionInformationFval_SM.m
May 9, 2019
dd9e70e
Update PositionInformationFval_SM.m
May 10, 2019
44a723e
Update PositionInformationFval_SM.m
May 10, 2019
b182114
Update PositionInformationFval_SM.m
May 10, 2019
2df911d
Update PositionInformationFval_SM.m
gaelias May 10, 2019
0e7b53f
Update PositionInformationContent_SM.m
May 12, 2019
53e9a16
Update PositionInformationFval_SM.m
May 12, 2019
d0e152a
080119 - Updating Accumulated Changes
Aug 1, 2019
8770c15
Update BayesPFCbsPROTO.m
gaelias Aug 1, 2019
5266be5
Update BayesPFCbsPROTO.m
gaelias Aug 1, 2019
dca5f34
Update BayesPFCbsPROTO.m
Aug 2, 2019
c60052c
Update BayesPFCbsPROTO.m
gaelias Aug 2, 2019
7363592
Update BayesPFCbsPROTO.m
gaelias Aug 2, 2019
45b96ea
Update BayesPFCbsPROTO.m
gaelias Aug 2, 2019
60f42b9
Update BayesPFCbsPROTO.m
Aug 2, 2019
6729c9b
Update BayesPFCbsPROTO.m
Aug 5, 2019
92e6d75
Update BayesPFCbsPROTO.m
Aug 5, 2019
b8bdbfd
Create BayesPFCbsPROTO_2.m
Aug 6, 2019
684f885
Update BayesPFCbsPROTO.m
Aug 6, 2019
a61e087
Update BayesPFCbsPROTO_2.m
Aug 6, 2019
895bcd6
Update BayesPFCbsPROTO.m
Aug 6, 2019
ddb53a1
Update BayesPFCbsPROTO_2.m
gaelias Aug 6, 2019
d7619f3
Update BayesPFCbsPROTO.m
gaelias Aug 6, 2019
aa2cda6
Update BayesPFCbsPROTO_2.m
gaelias Aug 6, 2019
743e01a
Update BayesPFCbsPROTO_2.m
Aug 6, 2019
96fdda3
Update BayesPFCbsPROTO_2.m
Aug 6, 2019
295196e
Update BayesPFCbsPROTO_2.m
gaelias Aug 7, 2019
7081324
Update BayesPFCbsPROTO.m
gaelias Aug 7, 2019
9a8df9d
Update BayesPFCbsPROTO.m
gaelias Aug 7, 2019
437d36e
Update BayesPFCbsPROTO_2.m
Aug 8, 2019
50fd209
Update BayesPFCbsPROTO.m
Aug 8, 2019
f203b8d
Update BayesPFCbsPROTO.m
gaelias Nov 12, 2019
3158f0f
Update BayesPFCbsPROTO.m
gaelias Nov 12, 2019
0263ffe
Update BayesPFCbsPROTO.m
gaelias Nov 12, 2019
1be05ad
Merge branch 'OrientationAnalysesAdded' of https://github.com/FortinL…
gaelias Nov 12, 2019
6b03a74
Local changes
Dec 11, 2019
173cb91
Merge branch 'OrientationAnalysesAdded' of https://github.com/FortinL…
Dec 11, 2019
e5e66d9
Create BayesPFCproto_VALID.m
gaelias Dec 12, 2019
e539305
Update BayesPFCproto_VALID.m
gaelias Dec 12, 2019
720f092
Update SummarizePLXevents_SD.m
gaelias Jan 24, 2020
62b5baa
Create CreateBehaviorMatrixPFCabbr.m
gaelias Jan 24, 2020
a7aee62
Update IdentifySWRs_SM.m
gaelias Jan 24, 2020
84ed614
Update BayesPFCproto_VALID.m
gaelias Jan 24, 2020
8f9620c
Update SummarizePLXevents_SD.m
gaelias Jan 24, 2020
1c0364d
Update CreateBehaviorMatrixPFCabbr.m
gaelias Jan 24, 2020
069e953
Update PositionInformationContent_SM.m
gaelias Jan 24, 2020
e15d20c
Update PositionInformationFval_SM.m
gaelias Jan 24, 2020
ba9e807
Update SummarizePLXevents_SD.m
gaelias Feb 6, 2020
3051791
Update SummarizePLXevents_SD.m
gaelias Feb 6, 2020
d1fad54
Update SummarizeUnits_SM.m
gaelias Feb 26, 2020
a0dcce3
Create RippleDetection_SM.m
gaelias Feb 26, 2020
d0656d8
Create RippleAnalysis_SM.m
gaelias Feb 26, 2020
5c31bd1
Create IdentifySWRs_SM.m
gaelias Feb 26, 2020
271f230
Delete IdentifySWRs_SM.m
gaelias Feb 26, 2020
faa741f
Create ExtractTrialEventRips_SM.m
gaelias Feb 26, 2020
99dd3f8
Create CurateRipples_SM.m
gaelias Feb 26, 2020
af81eb4
Update RippleDetection_SM.m
Feb 27, 2020
527065b
Update CurateRipples_SM.m
Feb 27, 2020
a7ccf3d
Update CurateRipples_SM.m
Feb 27, 2020
ed2cf98
Update CurateRipples_SM.m
Feb 27, 2020
afaf537
Update CurateRipples_SM.m
Feb 27, 2020
5b9d2d3
Update CurateRipples_SM.m
Feb 27, 2020
954fa6c
Create CurateRipples2_SM.m
Feb 27, 2020
3c3c49f
Update CurateRipples2_SM.m
gaelias Feb 27, 2020
72cc674
Update CurateRipples2_SM.m
gaelias Feb 27, 2020
66387ad
Update CurateRipples2_SM.m
gaelias Feb 27, 2020
bf5b47c
Update CurateRipples2_SM.m
Feb 27, 2020
8631de6
Create PlotNearTrialRipStats.m
Feb 27, 2020
f539981
Create PlotRipFeatsByTrlType.m
Feb 27, 2020
b4ff88d
Update RippleDetection_SM.m
Feb 27, 2020
1000ff9
Create PlotRipFeatsByOdor.m
gaelias Feb 27, 2020
1265b41
Update CurateRipples2_SM.m
gaelias Feb 27, 2020
8076ee2
Create PlotRipFeatCorr.m
gaelias Feb 27, 2020
d5e402b
Update CurateRipples2_SM.m
gaelias Feb 27, 2020
2eef8ad
Create PlotRipCountsByEvent.m
gaelias Feb 28, 2020
b633297
Update CurateRipples2_SM.m
gaelias Feb 28, 2020
caf8d5d
Update CurateRipples2_SM.m
gaelias Feb 28, 2020
fce8437
Update CurateRipples2_SM.m
Feb 28, 2020
2ee2178
Update RippleAnalysis_SM.m
Feb 28, 2020
1d5f87d
Merge branch 'OrientationAnalysesAdded' of https://github.com/FortinL…
Feb 28, 2020
e9b9c25
Update CurateRipples2_SM.m
Feb 28, 2020
cff7856
Update CurateRipples2_SM.m
Feb 28, 2020
53668d8
Update CurateRipples2_SM.m
Feb 28, 2020
9e2e417
Update CurateRipples2_SM.m
Feb 28, 2020
c350e11
Update CurateRipples2_SM.m
Feb 28, 2020
a8d3a61
Update CurateRipples2_SM.m
Feb 28, 2020
2356c96
Update CurateRipples2_SM.m
Feb 28, 2020
3335a15
Update CurateRipples2_SM.m
Mar 3, 2020
862e629
Update MorletAG.m
Mar 3, 2020
8d7a347
Update CurateRipples2_SM.m
Mar 3, 2020
bc256dc
Update CurateRipples2_SM.m
Mar 5, 2020
430c7f8
Create PlotRipFeatsByEvent.m
Mar 5, 2020
d529888
Update CurateRipples2_SM.m
Mar 6, 2020
7d32f58
Update CurateRipples2_SM.m
gaelias Mar 9, 2020
786ab28
Update CurateRipples2_SM.m
gaelias Mar 11, 2020
4c5ff58
Update CurateRipples2_SM.m
Mar 11, 2020
861b007
Update BayesPFCproto_VALID.m
Mar 11, 2020
2168791
Update CreateBehaviorMatrixPFCabbr.m
Apr 23, 2020
b947f31
Update SummarizePLXevents_SD.m
Apr 23, 2020
9890aa4
Create DualListMeanPlots_PROTO.m
May 22, 2020
ddeda91
Merge branch 'master' into OrientationAnalysesAdded
May 28, 2020
98ef230
Delete EnsembleCompilation_SM.m
Jul 2, 2020
52f99d8
Create EnsembleCompilation_SM.m
Jul 2, 2020
b608a20
Create OrganizeExtractTrialPeriod_SM.m
Jul 2, 2020
afe83d1
Create CreateOrientationMatrix.m
Jul 2, 2020
63beb72
Create PFC_MLB.m
Jul 2, 2020
ad0016e
Update OrganizeTrialData_SM.m
Jul 2, 2020
12c267f
Update CreateBehaviorMatrixPFCabbr.m
Jul 2, 2020
8ce6b3d
Update SummarizePLXevents_SD.m
Jul 2, 2020
e443605
Update PFC_MLB.m
gaelias Jul 2, 2020
7c52acc
Update PFC_MLB.m
gaelias Jul 2, 2020
89f8d3f
Rename PFC_MLB to slPFC_MLB
Jul 3, 2020
66fc0ea
Create PFC_MLB.m
Jul 3, 2020
6dc1666
Update PFC_MLB.m
Jul 27, 2020
ca65642
Create SimpleBetaViewer_Prototype.m
Jul 27, 2020
54b6092
Create slPFC_MLB_GroupPlot.m
Jul 27, 2020
6cbed41
Update SummarizePLXevents_SD.m
Jul 27, 2020
744427a
Update CurateRipples2_SM.m
Aug 17, 2020
dc8815c
Updates 2020.11.05
Nov 5, 2020
08b5a53
Create CurateSWR_SM.m
Dec 19, 2020
b042bda
Update SequenceNeuralViewer_SM.m
Dec 19, 2020
3a5df51
Update SequenceViewerNeural_SM.m
Dec 19, 2020
64045a6
Create CARcleaner_SM.m
Dec 19, 2020
dfb02c5
Update manualArtifactRemoval.m
Dec 19, 2020
0204bc2
Update CurateSWR_SM.m
Dec 21, 2020
6b7c87c
Update CurateSWR_SM.m
Dec 21, 2020
4b83f68
Create IdentifySWR_SM.m
Jan 15, 2021
4ff751a
Bunch o' stuff
Oct 25, 2021
eb67b02
Update SummarizePLXevents_SD.m
Dec 8, 2021
5a5732b
unpushed updates
gaelias Aug 9, 2023
90dfc08
Create statmatrixPythonBindings.py
gaelias Aug 9, 2023
b8e6f20
Update SummarizePLXevents_SD.m
gaelias Aug 9, 2023
852b851
Updates to include port light flag
gaelias Aug 10, 2023
ca3d5f0
Update CreateBehaviorMatrixPFCabbr.m
gaelias Aug 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Analyses/CalculateDprime.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function [dPrm, h, fa] = CalculateDprime(responseMatrix)
%%
if sum(responseMatrix(1,:)) == 1 || sum(responseMatrix(2,:)) == 1
dPrm = nan;
h = nan;
fa = nan;
else
h = responseMatrix(1,1)/sum(responseMatrix(1,:));
if h == 1
h = (sum(responseMatrix(1,:))-1)/sum(responseMatrix(1,:));
elseif h == 0
h = 1/sum(responseMatrix(1,:));
end
fa = responseMatrix(2,1)/sum(responseMatrix(2,:));
if fa == 1
fa = (sum(responseMatrix(2,:))-1)/sum(responseMatrix(2,:));
elseif fa == 0
fa = 1/sum(responseMatrix(2,:));
end

dPrm = norminv(h)-norminv(fa);
end
%
% beta = exp((norminv(fa)^2 - norminv(h)^2)/2);
%
% c = -.5 * (norminv(h) + (norminv(fa)));
20 changes: 20 additions & 0 deletions Analyses/CalculateRI.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function riVal = CalculateRI(responseMatrix)
if sum(responseMatrix(1,:)) == 1 || sum(responseMatrix(2,:)) == 1
riVal = nan;
else
h = responseMatrix(1,1)/sum(responseMatrix(1,:));
if h == 1
h = (sum(responseMatrix(1,:))-1)/sum(responseMatrix(1,:));
elseif h == 0
h = 1/sum(responseMatrix(1,:));
end
fa = responseMatrix(2,1)/sum(responseMatrix(2,:));
if fa == 1
fa = (sum(responseMatrix(2,:))-1)/sum(responseMatrix(2,:));
elseif fa == 0
fa = 1/sum(responseMatrix(2,:));
end
riVal = (h+fa-1)/(1-((h-fa)^2));
end

end
737 changes: 737 additions & 0 deletions Analyses/CurateRipples2_SM.m

Large diffs are not rendered by default.

192 changes: 192 additions & 0 deletions Analyses/CurateRipples_SM.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
%% CurateRipples(rips, trialRips)
global listSel
listSel = 1; % Used to keep track of which list is being selected from for ripple viewing
%%
rips = RippleDetection_SM;
[trialRips] = ExtractTrialEventRips_SM(rips, [500 700]);
allTrialRips = sortrows(cell2mat([trialRips.Events(:,1); trialRips.Events(:,2); trialRips.Events(:,3)]));
%% Create Figure
ripCure = figure;
rawAxes = axes(ripCure, 'position', [0.1, 0.75, 0.7, 0.2]);
bpfAxes = axes(ripCure, 'position', [0.1, 0.55, 0.7, 0.2]);
spkAxes = axes(ripCure, 'position', [0.1, 0.2, 0.7, 0.3]);
linkaxes([spkAxes, bpfAxes, rawAxes], 'x');

% Overall Ripple List
ssnRipTitleAx = axes(ripCure, 'position', [0.825, 0.925, 0.11, 0.05]);
set(ssnRipTitleAx, 'xlim', [-0.5 0.5], 'ylim', [0 0.5]);
text(ssnRipTitleAx, 0,0, 'Session Rips', 'horizontalalignment', 'center', 'verticalalignment', 'bottom');
axis(ssnRipTitleAx, 'off');
ssnRipList = uicontrol(ripCure, 'Units', 'Normalized', 'Style', 'listbox', 'String', 1:size(rips.Ripples.Events,1),...
'Position', [0.825, 0.55, 0.15, 0.375], 'Tag', 'ssnRip_Lst', 'Callback', @SelectSsnRip, 'userData', rips.TimeStamps(rips.Ripples.Events));

% Trial Ripple List
trlRipTitleAx = axes(ripCure, 'position', [0.825, 0.5, 0.11, 0.05]);
set(trlRipTitleAx, 'xlim', [-0.5 0.5], 'ylim', [0 0.5]);
text(trlRipTitleAx, 0,0, 'Trial Rips', 'horizontalalignment', 'center', 'verticalalignment', 'bottom');
axis(trlRipTitleAx, 'off');
trlRipList = uicontrol(ripCure, 'Units', 'Normalized', 'Style', 'listbox', 'String', 1:size(allTrialRips,1),...
'Position', [0.825, 0.2, 0.15, 0.300], 'Tag', 'trlRip_Lst', 'Callback', @SelectTrlRip, 'userData', rips.TimeStamps(allTrialRips));

% Zoom In
zoomOutBtn = uicontrol(ripCure, 'Units', 'Normalized', 'Style', 'pushbutton', 'String', 'Zm-',...
'Position', [0.35, 0.06, 0.05, 0.075], 'Callback', @ZoomOut);
% Zoom Out
zoomInBtn = uicontrol(ripCure, 'Units', 'Normalized', 'Style', 'pushbutton', 'String', 'Zm+',...
'Position', [0.65, 0.06, 0.05, 0.075], 'Callback', @ZoomIn);

% Previous Ripple
prevRipBtn = uicontrol(ripCure, 'Units', 'Normalized', 'Style', 'pushbutton', 'String', '<< Previous Ripple',...
'Position', [0.05, 0.05, 0.2, 0.1], 'Callback', @PrevRip);
% Next Ripple
nextRipBtn = uicontrol(ripCure, 'Units', 'Normalized', 'Style', 'pushbutton', 'String', 'Next Ripple >>',...
'Position', [0.75, 0.05, 0.2, 0.1], 'Callback', @NextRip);

% Remove Ripple
removeRipBtn = uicontrol(ripCure, 'Units', 'Normalized', 'Style', 'pushbutton', 'String', 'Remove Ripple',...
'Position', [0.425, 0.075, 0.2, 0.05], 'Callback', @RmvRip);

%% Plot Stuff
% Plot Raw LFP Traces
raw = plot(rawAxes, rips.TimeStamps, rips.SessionData.RawLFP, 'color', 'k');
for r = 1:length(raw)
raw(r).Color(4) = 0.2;
end
set(rawAxes, 'Tag', 'Raw_Axes');
% Plot Ripple Band LFP Traces
bpf = plot(bpfAxes, rips.TimeStamps, rips.SessionData.RipBPF, 'color', 'k');
for b = 1:length(bpf)
bpf(b).Color(4) = 0.2;
end
set(bpfAxes, 'Tag', 'Bpf_Axes');
% Plot Spiking Activity
[spkX, spkY] = find(rips.SessionData.Spikes~=0);
scatter(spkAxes, rips.TimeStamps(spkX),spkY, '*k');
% line(spkAxes, rips.TimeStamps(spkX),spkY, 'marker', '*', 'linestyle', 'none', 'color', 'k');
xlabel(spkAxes, 'Time (ms)');
set(spkAxes, 'Tag', 'Spk_Axes');

% Fiddle with Axes
set(rawAxes, 'color', 'none', 'ycolor', 'none', 'xcolor', 'none', 'xticklabel', [], 'box', 'off');
set(bpfAxes,'color', 'none', 'ycolor', 'none', 'xticklabel', [], 'box', 'off');
set(spkAxes, 'color', 'none', 'ycolor', 'none', 'box', 'off');
axis([rawAxes, bpfAxes,spkAxes], 'tight');
rawLim = repmat(get(rawAxes,'ylim'),[2,1]);
bpfLim = repmat(get(bpfAxes,'ylim'),[2,1]);
spkLim = repmat(get(spkAxes,'ylim'),[2,1]);
spkLim(:,1) = spkLim(:,1)-1;
spkLim(:,2) = spkLim(:,2)+1;
% Plot Trial Periods
for trl = 1:size(rips.TrialInfo.TrialPokes,1)
switch rips.TrialInfo.OdorVect(trl)
case 1
patchColor = [44/255 168/255 224/255];
case 2
patchColor = [154/255 133/255 122/255];
case 3
patchColor = [9/255 161/255 74/255];
case 4
patchColor = [128/255 66/255 151/255];
case 5
patchColor = [241/255 103/255 36/255];
end
patch(rawAxes, 'XData', [rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,1)), rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,2)), rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,2)),rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,1))],...
'YData', rawLim(:),...
'FaceColor', patchColor, 'FaceAlpha', 0.5,...
'EdgeColor', patchColor, 'EdgeAlpha', 0.5);
patch(bpfAxes, 'XData', [rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,1)), rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,2)), rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,2)),rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,1))],...
'YData', bpfLim(:),...
'FaceColor', patchColor, 'FaceAlpha', 0.5,...
'EdgeColor', patchColor, 'EdgeAlpha', 0.5);
patch(spkAxes, 'XData', [rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,1)), rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,2)), rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,2)),rips.TimeStamps(rips.TrialInfo.TrialPokes(trl,1))],...
'YData', spkLim(:),...
'FaceColor', patchColor, 'FaceAlpha', 0.5,...
'EdgeColor', patchColor, 'EdgeAlpha', 0.5);
end

for rip = 1:size(rips.Ripples.Events,1)
curRipX = [rips.TimeStamps(rips.Ripples.Events(rip,:)); flipud(rips.TimeStamps(rips.Ripples.Events(rip,:)))]';
patch(rawAxes, 'XData', curRipX,...
'YData', rawLim(:),...
'FaceColor', 'y', 'FaceAlpha', 0.15,...
'EdgeColor', 'y', 'EdgeAlpha', 0.5);
patch(bpfAxes, 'XData', curRipX,...
'YData', bpfLim(:),...
'FaceColor', 'y', 'FaceAlpha', 0.15,...
'EdgeColor', 'y', 'EdgeAlpha', 0.5);
patch(spkAxes, 'XData', curRipX,...
'YData', spkLim(:),...
'FaceColor', 'y', 'FaceAlpha', 0.15,...
'EdgeColor', 'y', 'EdgeAlpha', 0.5);
end

%% Callbacks
function SelectSsnRip(source,event)
global listSel
listSel = 1;
kids = get(get(source, 'Parent'), 'Children');
tags = arrayfun(@(a)a.Tag, kids, 'uniformoutput',0);
axTag = strcmp(tags, 'Raw_Axes');
set(kids(axTag), 'xLim', [source.UserData(source.Value,1)-(0.05),...
source.UserData(source.Value,2)+(0.05)]);
end

function SelectTrlRip(source,event)
global listSel
listSel = 2;
kids = get(get(source, 'Parent'), 'Children');
tags = arrayfun(@(a)a.Tag, kids, 'uniformoutput',0);
axTag = strcmp(tags, 'Raw_Axes');
set(kids(axTag), 'xLim', [source.UserData(source.Value,1)-(0.05),...
source.UserData(source.Value,2)+(0.05)]);
end

function NextRip(source,event)
global listSel
if listSel == 1
lstTarg = 'ssnRip_Lst';
else
lstTarg = 'trlRip_Lst';
end
kids = get(get(source, 'Parent'), 'Children');
tags = arrayfun(@(a)a.Tag, kids, 'uniformoutput',0);
lstTag = strcmp(tags, lstTarg);
kids(lstTag).Value = kids(lstTag).Value+1;
axTag = strcmp(tags, 'Raw_Axes');
set(kids(axTag), 'xLim', [kids(lstTag).UserData(kids(lstTag).Value,1)-(0.05),...
kids(lstTag).UserData(kids(lstTag).Value,2)+(0.05)]);
end

function PrevRip(source,event)
global listSel
if listSel == 1
lstTarg = 'ssnRip_Lst';
else
lstTarg = 'trlRip_Lst';
end
kids = get(get(source, 'Parent'), 'Children');
tags = arrayfun(@(a)a.Tag, kids, 'uniformoutput',0);
lstTag = strcmp(tags, lstTarg);
kids(lstTag).Value = kids(lstTag).Value-1;
axTag = strcmp(tags, 'Raw_Axes');
set(kids(axTag), 'xLim', [kids(lstTag).UserData(kids(lstTag).Value,1)-(0.05),...
kids(lstTag).UserData(kids(lstTag).Value,2)+(0.05)]);
end

function ZoomOut(source,event)
kids = get(get(source, 'Parent'), 'Children');
tags = arrayfun(@(a)a.Tag, kids, 'uniformoutput',0);
axTag = strcmp(tags, 'Raw_Axes');
curX = get(kids(axTag), 'xLim');
set(kids(axTag), 'xLim', [curX(1)-(0.01),...
curX(2)+(0.01)]);
end

function ZoomIn(source,event)
kids = get(get(source, 'Parent'), 'Children');
tags = arrayfun(@(a)a.Tag, kids, 'uniformoutput',0);
axTag = strcmp(tags, 'Raw_Axes');
curX = get(kids(axTag), 'xLim');
set(kids(axTag), 'xLim', [curX(1)+(0.01),...
curX(2)-(0.01)]);
end
Loading