quickplotcompBerrors.m 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. function quickplotcompBerrors(theta,uno,dos,titulo,legyes,Aave);
  2. colores=(colormap((summer(3))));
  3. colores(1,:)=[0.9 0 0.7];
  4. theta=[theta theta(1)];
  5. uno=[uno; uno(1,:)];
  6. dos=[dos; dos(1,:)];
  7. dat{1}=uno;
  8. dat{2}=dos;
  9. legcoun=2;
  10. for i = 1:2
  11. ap=nanmean(dat{i},2);
  12. chance=ap;
  13. chance(:)=0.5;
  14. sem=nanstd(dat{i},1,2)/sqrt(size(dat{i},2));
  15. uppererror=ap+sem;
  16. lowerror=ap-sem;
  17. pl{1}=polarplot(theta,chance,'k--','LineWidth',2);hold on;
  18. polarplot(theta,ap,'-','Color',colores(1+i-1,:),'LineWidth',2.5);hold on;
  19. pl{legcoun}=polarplot(theta,ap,'o','Color',colores(1+i-1,:),'MarkerFaceColor',colores(1+i-1,:),'MarkerSize',8); hold on;
  20. legcoun=legcoun+1;
  21. if legcoun~=3
  22. pl{legcoun}=polarplot(theta,uppererror,'--','Color',colores(1+i-1,:),'LineWidth',2);hold on;
  23. polarplot(theta,lowerror,'--','Color',colores(1+i-1,:),'LineWidth',2);hold on;
  24. end
  25. legcoun=legcoun+1;
  26. end
  27. if legyes
  28. legend([pl{1} pl{2} pl{4} pl{5}],'unbiased (B=0)',['model (B=' num2str(Aave) ')'],'mean behaviour','SEM behaviour','Location','SouthOutside')
  29. end
  30. rlim([0 0.7]);
  31. title(titulo); %legend('model','behav','Chance')
  32. end