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

Enforce sensible aspect ratio for PCA plots #95

Open
lgatto opened this issue Dec 6, 2018 · 6 comments
Open

Enforce sensible aspect ratio for PCA plots #95

lgatto opened this issue Dec 6, 2018 · 6 comments

Comments

@lgatto
Copy link
Owner

lgatto commented Dec 6, 2018

Based on feedback from EuroBioc2918:

PCA plots should have 1:1 aspect ratio, and generally be wider (PC1) than high (PC2)

@lgatto
Copy link
Owner Author

lgatto commented Apr 28, 2020

Clarification - plots should be wider, to account more var explained along PC1.

@lmsimp lmsimp mentioned this issue Apr 28, 2020
@lgatto
Copy link
Owner Author

lgatto commented Oct 24, 2020

This have the feeling that this has worsened with v2 with the left and right side bars.

@lgatto
Copy link
Owner Author

lgatto commented Oct 24, 2020

ping @lmsimp

@lmsimp
Copy link
Collaborator

lmsimp commented Oct 25, 2020

I can have a look into this again.

The user has the option to hide the sidebars in the dashboard leaving the whole plot space free. So they can have more plot space than in the previous app style.

The motivation behind the sidebars is not to be fancy but make the main plot space cleaner. Unfortunately, in Shiny it’s not trivial to specify fixed elements and to stop elements overlapping with one another eg see this post https://stackoverflow.com/questions/63833695/stop-elements-in-a-shiny-sidebarpanel-from-overlapping-in-columns

@lmsimp
Copy link
Collaborator

lmsimp commented Mar 24, 2021

Only feasible option I see here is to have the plots one above another e.g.

mfrow = c(2, 1)

and then fix the y-axis

@lmsimp lmsimp changed the title Enforce 1:1 ratio for PCA plots Enforce sensible aspect ratio for PCA plots Mar 24, 2021
@lmsimp
Copy link
Collaborator

lmsimp commented Mar 24, 2021

See https://www.huber.embl.de/msmb/Chap-Multivariate.html

Beware the aspect ratio when plotting a PCA. It is rare to have the two components be of similar norm, so square shaped plots will be the exception. More common are elongated plots, which show that the horizontal (first) principal component is more important than the second. This matters, e.g., for interpreting distances between points in the plots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants