Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ellipses colour do not match plot points colour #307

Open
qutkat opened this issue May 28, 2024 · 2 comments
Open

Ellipses colour do not match plot points colour #307

qutkat opened this issue May 28, 2024 · 2 comments
Assignees
Labels
bug Something isn't working wip work-in-progress

Comments

@qutkat
Copy link

qutkat commented May 28, 2024

Hello - I am trying to run an sPLSDA showing beta diversity data for 3 different weeks. When the plot is produced the ellipses are correct for all 3 weeks, but the colour of the data points for 2 of the weeks does not match the colour of the ellipses - they are switched around. I tried restarting Rstudio and reloading mixOmics from github but it is still happening.

betaplot$Week <- factor(betaplot$Week, levels = c("1", "5", "11"), labels = c("Week 1", "Week 5", "Week 11"))
taxon = taxa %>% rownames_to_column('Sample ID') %>% semi_join(betaplot, taxa, by = 'Sample ID') %>% column_to_rownames('Sample ID')

result = splsda(taxon, betaplot$Week, ncomp = 2, keepX = c(466,466))
plot = plotIndiv(result,centroid = FALSE, ellipse = TRUE,ind.names = FALSE, title = "sPLSDA - Beta diversity by Week", legend=TRUE)

I have tried to upload the resulting image here:
Capture

@qutkat qutkat added the bug Something isn't working label May 28, 2024
@qutkat
Copy link
Author

qutkat commented May 29, 2024

Hello - please note that I also tried running your Case Study of sPLS-DA with SRBCT dataset using the exact code provided and I encountered the same issue. The blue and orange data points were switched around and did not match the image provided in the tutorial, but the ellipses were correct.

@samuelmontgomery
Copy link

I am having the same issue (and have for a few versions now but it seems to have not been fixed) when using plotIndiv - I much prefer using mixOmics for my work, but I am having to find alternative for plotting results at the moment as it makes it hard to interpret

@evaham1 evaham1 self-assigned this Sep 23, 2024
@evaham1 evaham1 added the wip work-in-progress label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wip work-in-progress
Projects
None yet
Development

No branches or pull requests

4 participants