function mattCorr(exp1,exp2) %% cc = false; figure; [corrScore,pVal] = corrcoef(exp1,exp2,'rows','pairwise') a = scatter(exp1,exp2); a.SizeData = 50; if cc a.MarkerFaceColor = 'k'; a = lsline; a(1).Color = [1 0.7 0.7]; a(1).Color = [0 1 1]; x1 = 0.15;y1 = 0.85; x2 = 0.15;y2 = 0.75; cl = [1 1 1]; else a.MarkerEdgeColor = [0.6 0.1 0.1]; a.MarkerFaceColor = [0.75 0.75 1]; a.MarkerEdgeColor = [0 0 0]; a.MarkerFaceColor = [0.75 0.75 1]; a.MarkerFaceColor = [0 0 0]; l1 = max(exp2)-min(exp2);l11 = max(exp2)-(0.05*l1);l22 = max(exp2)-(0.1*l1); xl1 = max(exp1)-min(exp1);xl11 = max(exp1)-(0.05*xl1);xl22 = max(exp1)-(0.05*xl1); a = lsline; a(1).Color = [0 0 0]; y1 = l11; y2 = l22; x1 = xl11; x2 = xl22; cl = [1 1 1]; end a(1).LineWidth = 1; text1 = strcat('r-value: ',num2str(round(corrScore(2),3))); a = text(x1,y1,text1,'HorizontalAlignment','right'); a.FontSize = 16; a.FontName = 'Times New Roman'; a.Color = [0 0 0]; text1 = strcat('p-value: ',num2str(round(pVal(2),3))); a = text(x2,y2,text1,'HorizontalAlignment','right'); a.FontSize = 16; a.FontName = 'Times New Roman'; a.Color = [0 0 0]; set(gca,'fontsize',30) set(gca,'color','white') set(gcf,'Color','white') set(gca,'XColor','black','YColor','black','ZColor','black','FontSize',16,'Color',[1 1 1]) % y = input('y label'); % x = input('x label'); % xlabel(y) % ylabel(x) grid on set(gca,'GridColor','black') %axis([-1 1 -1 1]) cleanFormat