2

I have a histogram and I was hoping someone had some code so I could overlay a "normal" distribution so it is clear how my data deviates from that. This is the code that I have rn:

  ggplot(examopg2, aes(x= ideology))+ 
  geom_bar()+ 
  labs(title = "Ideologi", x='Ideologi')+
  theme_classic()

The picture attached is roughly what I am looking for, thank y'all:)

enter image description here

stefan
  • 90,330
  • 6
  • 25
  • 51
  • Please share your data using `dput(df)`? – Quinten May 23 '22 at 16:46
  • 1
    No picture is attached – Jeff May 23 '22 at 16:49
  • Maybe https://stackoverflow.com/questions/61339178/overlay-normal-curve-to-histogram-in-ggplot2 or https://stackoverflow.com/questions/6967664/ggplot2-histogram-with-normal-curve helps to answer your question – stefan May 23 '22 at 16:51

0 Answers0