daattali / ggExtra

📊 Add marginal histograms to ggplot2, and more ggplot2 enhancements
http://daattali.com/shiny/ggExtra-ggMarginal-demo/
Other
383 stars 48 forks source link

Reversing a scale does not cause the marginal plots to reverse #94

Closed daattali closed 6 years ago

daattali commented 6 years ago

Could be related to #81 et al

p <- ggplot(mtcars, aes(x = wt, y = drat)) +
    geom_point()

ggMarginal(p)
ggMarginal(p + scale_x_reverse())

image

image

crew102 commented 6 years ago

Yep, related to #81. I just put together a fix for #81 that only included a fix for limits issues, and was actually wondering if something like this occurs as well. It's happening b/c the scale from the scat plot isn't getting applied to the marginals. I think I have a more general fix that will fix this and #81

On Feb 15, 2018 6:39 PM, "Dean Attali" notifications@github.com wrote:

Could be related to #81 https://github.com/daattali/ggExtra/issues/81 et al

p <- ggplot(mtcars, aes(x = wt, y = drat)) + geom_point()

ggMarginal(p) ggMarginal(p + scale_x_reverse())

[image: image] https://user-images.githubusercontent.com/952340/36286852-8bfb9774-127f-11e8-8d75-413172d0de91.png

[image: image] https://user-images.githubusercontent.com/952340/36286842-845236f4-127f-11e8-870d-076a903c40ba.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/daattali/ggExtra/issues/94, or mute the thread https://github.com/notifications/unsubscribe-auth/AKs3OQB5fLvkWmX8NfPYT5fWkXGFflqmks5tVMAvgaJpZM4SHriK .

daattali commented 6 years ago

fixed by @crew102