Skip to content

Commit

Permalink
mri lesional analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
erinconrad committed Apr 30, 2024
1 parent 4e79225 commit 4d04539
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions tools/get_p_text_tle.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function ptext = get_p_text_tle(p)

if p < 0.001
ptext = '\itp\rm < 0.001';
elseif p < 0.05
ptext = sprintf('\\itp\\rm = %1.3f',p);
else
ptext = sprintf('\\itp\\rm = %1.2f',p);
end

end
2 changes: 1 addition & 1 deletion tools/unpaired_plot_temporal_paper.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
ylnew = [yl(1) yl(1)+(yl(2)-yl(1))*1.2];
ylim(ylnew)
plot([1 2],[ybar,ybar],'k','linewidth',2)
text(1.5,ytext,get_p_text(p),'fontsize',15,'horizontalalignment','center')
text(1.5,ytext,get_p_text_tle(p),'fontsize',15,'horizontalalignment','center')
set(gca,'fontsize',15)

end

0 comments on commit 4d04539

Please sign in to comment.