I am having difficulty getting a histogram that was fairly easy to do in python with pyplot. I have a large data set that looks like this:
v1 age gender test result count
0 50 M Glu 188 183892
1 80 F Cl 102 48907
2 50 M Glu 42 13683
3 30 M Glu 272 2859
4 80 M Urea 68 37053
5 40 M Glu 574 467
6 60 M Cl 118 50066
7 100 M Glu 749 1
8 50 F Glu 393 714
9 60 M Urea 140 2568

There are 33,024 rows. The count represents the number of time a particular result, such as 188 in row 0, was recorded by a lab. I'd like to plot histogram of the tests (eventually broken down by ages, gender) with the count on the yaxis and the result (188) on the x-axis. It should look something like below. I want to do with every analytes - so glucose, urea, chloride, etc.


Array


I'm rather new to Stata - taking a course now - and have tried
histogram count if test=="Glu", by(result)
[also the 2way option]
But get an error "too many sersets".

Any advice?

Thanks,
Nathan