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

Removing title in ggally_cor #440

Open
tamas-ferenci opened this issue Jun 6, 2022 · 4 comments
Open

Removing title in ggally_cor #440

tamas-ferenci opened this issue Jun 6, 2022 · 4 comments

Comments

@tamas-ferenci
Copy link

One would expect that title="" removes the title in ggally_cor. However, the colon and the line break unfortunately remains, see the following reproducible example:

library(GGally)
data(flea)
ggpairs(flea, columns = 2:4, upper = list(continuous = wrap(ggally_cor, title = "")))

Is it possibly to correctly remove the title altogether (i.e., that only a single number remains, and nothing else)?

@smouksassi
Copy link

in ggplot in general argument="" does not "removes" the item .
for that you have element_blank
How the function is written it does not allow to "blank" / remove the title completely

title = title,

title,

you can rewrite the function in a way that allows to remove it pointers above

@tamas-ferenci
Copy link
Author

Thanks! I could've checked ggally_corrs source code myself, sorry... My original question is perhaps better formulated as a feature suggestion in this case. At first glance it seems that allowing sep to be user-manipulated (i.e., adding it as an argument, keeping its current value as default) is a backward compatible change which would also solve this problem.

@schloerke
Copy link
Member

sep = if ("colour" %in% names(mapping)) ": " else ":\n",

@ewallace
Copy link
Contributor

ewallace commented Jul 5, 2024

I'm bumping this issue, as being able to completely remove the title is a feature request that I would also like.

One way around this would be to make the default title "Corr:\n" instead of "Corr", and removing the ":\n" so that having the title as "" would not add any characers.

Stack Overflow related solution: https://stackoverflow.com/questions/67835644/how-can-i-remove-the-corr-text-from-the-correlation-matrix-done-with-ggally

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

4 participants