I am trying to make a histogram for a continuous variable 'length' across the categories of a dichotomous variable 'foreign' with normal curves for both histograms. I want both histograms in the same graph.
I tried using the code:
but it throws an error message
KIndly advise how to fix this.
I am looking to construct a graph like this here in the attached image:
I tried using the code:
Code:
sysuse auto hist length if foreign == 0, fcolor(blue%50) normal addplot(hist length if foreign == 1, fcolor(green%30) normal)
option normal not allowed
I am looking to construct a graph like this here in the attached image:
Comment