daattali / ggExtra

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

Feature request type="barplot" #102

Closed skanskan closed 6 years ago

skanskan commented 6 years ago

Please add the option for ggMarginal, type="barplot". With "histogram" we can't use discrete variables.

crew102 commented 6 years ago

Hi @skanskan, by "discrete variables" are you talking about factor/character variables? ggMarginal() requires that the user pass in a scatter plot for the main plot, and since a scatter plot requires a numeric x and y aesthetic (i.e., not a factor/character variable for x and y aesthetic), it would not be possible to create a marginal distribution of a factor variable.

skanskan commented 6 years ago

Yes I'm talking about a factor variable. I'm creating a geom_tile() plot with two factor variables and I'd like to add marginal barplots.

crew102 commented 6 years ago

A similar feature request was made in #98. @skanskan , you can refer to the comments mentioned in that thread for why this feature will likely not be implemented.

daattali commented 6 years ago

@skanskan this feature will not be supported, from the reasons @crew102 pointed out