-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
ggMarginal ignores expand argument #145
Comments
Can you please add a small fully reproducible example code |
Sure thing, @daattali Load packages & generate data
Using the default
Using
I was able to fix it very crudely by adding a logical argument called Thanks for maintaining this great package. |
Great, thanks for the detailed report and examples. I'm on mobile and rushing, but is this related/duplicate of #128 ? |
They're very closely related for sure (sorry for not referencing #128), but I think this may be a separate (or subset) of that issue that would be easier to fix. |
Thanks for reporting. Feel free to take a look and tackle it in the proper
way if you find some time!
…On Fri, Jun 21, 2019, 17:20 Will Petry ***@***.*** wrote:
They're very closely related for sure (sorry for not referencing #128
<#128>), but I think this may
be a separate (or subset) of that issue that would be easier to fix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#145?email_source=notifications&email_token=AAHIQFDCR2LYOQ34CG73VH3P3VA2XA5CNFSM4H2T5XHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYJTUSA#issuecomment-504576584>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHIQFDODCDF3OYQQ445RWLP3VA2XANCNFSM4H2T5XHA>
.
|
I thought I had a solution for the CRAN version, but I see that the GH version has switched to R6. I'm afraid this is a bit out of my depth. |
I'd be happy to integrate your solution into the current codas of ggExtra, so long as the fix you're talking about isn't too hairy. |
Hi @wpetry , I looked into this and it basically amounts to #128. library(ggplot2)
library(ggExtra)
set.seed(503234)
dat <- data.frame(
x = rbeta(5000, shape1 = 5, shape2 = 1),
y = exp(rnorm(5000, mean = 0, sd = 2))
)
p <- ggplot(dat, aes(x, y)) +
geom_point() +
scale_y_log10() +
coord_cartesian(xlim = c(0, .5), expand = TRUE)
ggMarginal(p) Created on 2019-06-29 by the reprex package (v0.2.0.9000). |
Thanks for looking into it. Closing this as duplicate |
In
ggMarginal
, the marginal plots useexpand = TRUE
even if the user has specifiedp
to haveexpand = FALSE
. This leads to a misalignment of the data between the main plot and margins.The text was updated successfully, but these errors were encountered: