Hi all,

I would like to draw a graph with three information: 1. Age on y-axis(1) 2. Gender on y-axis (2) and 3. Number of Students as a histogram with numbers showing up. X-axis is year.


graph twoway (line Age Year, yaxis(1)) (line Gender Year, yaxis(2)) (hist Student Year), xlabel(1990(5)2019, labsize(small)) xline(0, lp(-)) legend(size(small) label(1 "Age") label(2 "Gender"))

It gives me the result saying that "too many variables specified"

Is there any other command that I can use to have three variables at the same time? Num of student has to be a histogram. Thank you.