Fig2C_LinePlot.m 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. %% Fig. 2C_LinePlot - k-mean groups Go Expert-Expert
  2. clear all
  3. close all
  4. % ==========================================================================
  5. %% k-means cluster lineplot (Expert-Expert in Go trial)
  6. % ==========================================================================
  7. %Prepare variables
  8. load('Fig2C_LinePlot.mat');
  9. TimeWinFrame = [-15:1:120];% -0.5 s to 4.0 s
  10. fs = 30;
  11. %%
  12. ColorCode = [0 0 1; 1 0 0; 0.75 0.75 0.75; 0.5 0.5 0.5];
  13. NofCluster = 9;
  14. for iCluster = 1:NofCluster
  15. switch iCluster
  16. case 1
  17. FigTitle = 'StableUp';
  18. case 2
  19. FigTitle = 'RampUp';
  20. case 3
  21. FigTitle = 'RampDown';
  22. case 4
  23. FigTitle = 'IniUp';
  24. case 5
  25. FigTitle = 'RevUp';
  26. case 6
  27. FigTitle = 'Ini-RampUp';
  28. case 7
  29. FigTitle = 'Ini-RampDown';
  30. case 8
  31. FigTitle = 'Rev-RampUp';
  32. case 9
  33. FigTitle = 'Rev-RampDown';
  34. end
  35. fig=figure;
  36. fig.Position = [400 550 345 164];
  37. for iPhase = 1:4
  38. Mean = LineMean(iCluster, :, iPhase);
  39. SEM = LineSEM(iCluster, :, iPhase);
  40. shadedErrorBar2(TimeWinFrame/fs, Mean, SEM, {'-','color', ColorCode(iPhase, :)});
  41. hold on;
  42. end
  43. box off;
  44. xlim([-0.5 4.0]);
  45. ylim([-0.8 0.8]);
  46. hline(0,'k')
  47. title(FigTitle);
  48. end