0
ggplot(expressiongenes, aes(x = Jour, y = NE.EcR.M, fill = Jour)) +
  stat_summary(
    geom = "bar",
    fun = "mean",
    position = "dodge",
  ) +
  facet_wrap(~ Exposition) +
  scale_fill_manual(values = c("grey", "grey35", "grey20")) +
  theme_bw() +
  theme() +

This code used to work yesterday, but doesn't today. I've tried using either geom_col or geom_bar but i can't seem to achieve my goal I verified my dataframe, and i've loaded the necessary libraries Graph i obtain with this code, instead i would like for each Jour (my category) to display a single bar corresponding to the mean value

Feel free to tell me if what details i can add to better explain my problem :)

stefan
  • 90,330
  • 6
  • 25
  • 51
  • Welcome to SO! From the image of your plot I would guess that your `NE.EcR.M` column is a character or factor instead of a numeric. Check your data and if so convert to a numeric. For more help please provide [a minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) including a snippet of your data or some fake data, e.g. by running `dput(head(expressiongenes))` and adding the result into your post. – stefan Aug 11 '23 at 10:56
  • @stefan Thank you !! it worked ! i didn't think to check that ^^ – Marion L Aug 11 '23 at 13:08

0 Answers0