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 · 3 comments
Open

Removing title in ggally_cor #440

tamas-ferenci opened this issue Jun 6, 2022 · 3 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",

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

3 participants