DABEST-python
DABEST-python copied to clipboard
Little problems with the plots
Hello, I'm using your wonderful package but I am wondering if there is a bug or if it comes from me.
- 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 :
Is it expected or something goes wrong ?
- 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 :
- Moreover, I don't know if is it possible to put a title on the plots, I haven't found the argument for.
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!
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 !
Hello !
I have few issues with the tool again.
- First of all, I have the same problem than before with the color of the repeated measures plot using the following data : result_df.csv
Here is the plot I have with these data :
We can see colors in the plot which are not present in the legend.
- Then, in the same data file, I have data which are missing that I have replaced by '0' in the dataframe to make the plot work because I think that 'NaN' or 'None' values doesn't make the plot work. What can I do with this to avoid loosing data ?
If I am wrong with something, I am open to your help.
Thanks a lot
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.