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

Add y=0 line to the figures created by plotmeanSnPM.m #22

Closed AlessiaPesenti7 closed 2 years ago

AlessiaPesenti7 commented 2 years ago

Hi, I would like to add a dashed y = 0 line to this graph (like the hot pink one). I took a look at the plotmeanSnPM.m function (if I don't get wrong I should work on this function), but I don't know where to start. Is it possible to do this? Many thanks in advance!

Immagine 2022-09-19 124507

tramarobin commented 2 years ago

Hi Alessia,

This is totally feasible. I wanted to add this functionality but never had or took the time to do it. I will work on that and let you know when it is done.

Best, Robin

tramarobin commented 2 years ago

I implemented options to draw vertical and horizontal lines, as well as options to display vertical and horizontal grids. These options are implemented for fctSnPM and saveNplot functions (not to onlyPlot)

To add a black dotted horizontal line at y=0, with a linewidth of 1, you can write. xLine{1}={0,'k--',1};

Then add the option 'xLine' ,xLine in the fctSnPM function.

You can find additional information here: https://github.com/tramarobin/fctSnPM#1d-plot-parameters I added an example of this functionality in D1_ANOVA1rm.m

Let me know if it works as you wish. And don't hesitate to share ideas of improvements.

Best, Robin

AlessiaPesenti7 commented 2 years ago

It works perfectly, thank you very much!

I noticed in the README.md, in the 1D plot parameters section, it says 'xLine: allows to add vertical lines' instead of horizontal lines.

Thanks again for your valuable work!

Best, Alessia

tramarobin commented 2 years ago

Great! good to hear. Oh thanks, it has been corrected.

Best, Robin