79324956

Date: 2025-01-02 21:05:39
Score: 7 🚩
Natty:
Report link

I'm trying to use geom_area() in a different way, e.g. AUC. I refer to the example in https://www.sthda.com/english/wiki/ggplot2-area-plot-quick-start-guide-r-software-and-data-visualization

dat <- with(density(df$weight), data.frame(x, y))
ggplot(data = dat, mapping = aes(x = x, y = y)) +
 geom_line()+
    geom_area(mapping = aes(x = ifelse(x>65 & x< 70 , x, 0)), fill = "red") +
    xlim(30, 80)

Can someone help me understand why the result is different when we remove xlim(30, 80) ?

The different in the two images are below:enter image description here

Reasons:
  • Blacklisted phrase (1): help me
  • Blacklisted phrase (1): enter image description here
  • RegEx Blacklisted phrase (3): Can someone help me
  • Probably link only (1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: avery