daattali / ggExtra

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

ggMarginal support for groupShape = T #167

Closed taylorreiter closed 2 years ago

taylorreiter commented 2 years ago

Hello! I'm writing to ask whether it would be feasible/in the spirit of ggMarginal to support histograms based on shape type.

I have the following scatter plot:

Screen Shot 2022-05-02 at 3 48 44 PM

I would like to add marginal density curves based on the shape, status.

I imagine mapping shape <-> ggMarginal color may be difficult. Perhaps having a line type that was based on the shape, or in cases like the above, having on histogram filled in and one not?

I totally understand if this isn't feasible, but I thought I'd ask!

taylorreiter commented 2 years ago

Well -- I just tried a workaround and realized the title of this issue doesn't actually make sense...but I'm still interested in whether this functionality would work in ggMarginal!

daattali commented 2 years ago

Sorry, only grouping by colour is supported. If you really wanted to you could modify the source code to work for shapes too by looking how we do it for colours, but I prefer not to add that into the package because then there would be a laundry list of arguments