tramarobin / fctSnPM

Using spm1d package (v.0.4.3), compute anova and post-hoc tests from anova1 to anova3rm, with a non-parametric approach (permutation tests)
GNU General Public License v3.0
2 stars 2 forks source link

Graph style change #18

Closed jinhee615 closed 3 years ago

jinhee615 commented 3 years ago

Hello!

I want to change graph styles.

image

  1. I want to remove Standard deviation area (mean only)
  2. I want to remove its title.
  3. I want to change Line style (-- or .-)and color.

Can I change those?

tramarobin commented 3 years ago

Hi

You have to download the package again to obtain the updated funtions. You can find a new example D1_ANOVA2_1rm_3x3modal.m which correspond to your data organisation I add the different parameters to obtain what you wanted.

I want to remove Standard deviation area (mean only)

You can use the optional input CI and give a negative value. I don't think this is the best representation as SD are important when presenting data, but you can do it now. If the SD is to large, you can use IC = 0 to display the SEM or IC = 0.95 to display the confidence intervals. There should be narrower and still gives information about the dispersion of data.

I want to remove its title.

When using IC<0 the title will be removed. However, if you want to display any dispersion parameters 'SD, SEM, IC), the title will be displayed. You can remove it with the .fig files (use openfig('figname','visible') as they are store in invisible. You can also edit the image with powerpoint, paint...

I want to change Line style (-- or .-)and color.

To change color, use colorLine input, and for the lineStyle use 'linestyleinput. InD1_ANOVA2_1rm_3x3modal.m`

independantEffects{1}={'I','I','I','I','I','I','N','N','N','N','N','N','O','O','O','O','O','O','O','O'}; % same number than participants as you already did
colorLine{1}=[rgb('blue'); rgb('magenta'); rgb('black')]; % one color for each modality (I, N or O)
lineStyle{1}={':' '-' '--';':' '-' '--'}; % One style for each modality. first row is for the means, second row for the sd. (if there is no SD, no need to complete the second row)

You can of course also modify the lines for the second effect with lineStyle{2}=; and the styles you want.

jinhee615 commented 3 years ago

WOW! Thank You so much!

I add 'CI',-1, But they error occurred

my code is

spmAnalysis2=fctSPM(Y3,independantEffects, repeatedMeasuresEffects, 'effectsNames', effectNames, 'multiiT', 500 , 'maximalIT', 20000, 'savedir', savedir, 'CI', -1, 'colorline',colorLine,'linestyle',lineStyle);

image

tramarobin commented 3 years ago

I add 'CI',-1, But they error occurred

Did you download the entier package and not only fctSPM.m ? If not, you must download the entire package. And if you did, could you indicate me the name of the function and the line please ? When I run the script on my computer it runs fines.

tramarobin commented 3 years ago

I saw your comment on email but it doesn't appear here. It looks like that the version of the function you downloaded was not updated... I don't know why. The function plotmean.m must be this one

function []=plotmean(Data,IC,xlab,ylab,Fs,xlimits,nx,ny,clPlot,imageFontSize,imageSize,transparancy1D,ylimits)

When I download the version at this link, it downloads the updated one, try with the link and it should work.

jinhee615 commented 3 years ago

It worked after I moved my laptop to desktop. Thank You sooo much and I'm sorry that I make you confused!!