ACCLAB / DABEST-python

Data Analysis with Bootstrapped ESTimation
https://acclab.github.io/DABEST-python/
Apache License 2.0
340 stars 47 forks source link

Little problems with the plots #144

Closed PaulCarrascosa closed 2 months ago

PaulCarrascosa commented 1 year ago

Hello, I'm using your wonderful package but I am wondering if there is a bug or if it comes from me.

  1. I work now on repeated measures with paired data, I should have the same colors for the 3 individuals in my group (I have 5 groups of 3 individuals) but instead I have 2 identical colors and one which is not very similar per group. Here is a view of my plot :

Capture d’écran 2023-04-07 162228

Is it expected or something goes wrong ?

  1. Another thing, I've searched how to put the title on the legend of a 'basic' .load() because I do "color_col=" as a .plot() parameter but I just have the values, it could be great to have the title. If I do the same thing as the plot for repeated measures (which has the title on the legend) it doesn't work. Here the view of the plot with the problem of the legend :

Capture d’écran 2023-04-07 163212

  1. Moreover, I don't know if is it possible to put a title on the plots, I haven't found the argument for.
maiyishan commented 1 year ago

Hi @PaulCarrascosa,

Thank you for using DABEST!

For issue 1, this is unexpected behavior and we are not sure what could be causing this. Would you be willing to provide your dataset so we can attempt to reproduce?

For issues 2 and 3, DABEST does not currently have an argument for adding titles to figures. We will add this to future versions, but for now you should be able to add them post-hoc using matplotlib.

Thank you!

PaulCarrascosa commented 1 year ago

I closed it by mistake, sorry !

Thanks for you fast answer !

Here are the data I'm using to plot the repeated measures : Data.csv

I will try with matplotlib then, thank you !

PaulCarrascosa commented 1 year ago

Hello !

I have few issues with the tool again.

Here is the plot I have with these data : Move isolated

We can see colors in the plot which are not present in the legend.

If I am wrong with something, I am open to your help.

Thanks a lot

JAnns98 commented 2 months ago

Hi, apologies for the late response. I have followed up on this and tested your dataset on the newest Python release (v2024.03.29). It seems to work as intended now with the correct colouring of the lines.

With regards to working with NaNs, this is an issue with paired data as you mentioned. There is no perfect solution to dealing with missing data and by default, dabest will remove pairs with a NaN (as it is unable to perform calculations etc with these).

I hope this issue is now resolved on your end, but please let us know if there are still such issues.