daattali / ggExtra

📊 Add marginal histograms to ggplot2, and more ggplot2 enhancements

Home Page:http://daattali.com/shiny/ggExtra-ggMarginal-demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ggMarginal support for groupShape = T

taylorreiter opened this issue · comments

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!

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!

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