0

Is there any way to put the count in marginal histogram in this plot?

ggMarginal(p1, margins = "x", size = 2, type = "histogram",
           col = "blue", fill = "orange")

(source: https://github.com/daattali/ggExtra)

enter image description here

Marco Sandri
  • 23,289
  • 7
  • 54
  • 58
bmishra
  • 19
  • 2
  • @MarcoSandri I think they want this: https://stackoverflow.com/questions/6455088/how-to-put-labels-over-geom-bar-in-r-with-ggplot2 – zx8754 May 01 '18 at 09:57
  • The answer seems to be in the post that you have linked to. Have you tried the examples there? – hpesoj626 May 01 '18 at 10:07
  • yes the link has explained well, I tried to pass the count in the y-axis of the marginal histogram but it doesn't work in the outcome figure. Here is the code I used. ggMarginal(p, margins = "x", size = 2, type = "histogram",xparams = list(alpha=0.6, aes(y = ..count..)), col = "blue", fill = "orange") – bmishra May 02 '18 at 08:17

0 Answers0