Dear Statalists,
My dataset contains duration in minutes of exams in multiple subjects.
I want to graph the frequency of every duration by each subject.
For example, when I tabulate duration if the subject is math
I get
When I use histogram for this propose:
I get this histogram

As you can see, for one that does not have the tabulate output for above from the duration variable, it is very hard to what are the values around 100.
Thus, I want my histogram to present only the listed values of duration and specify them.
It should look like this:

Many Thanks!
My dataset contains duration in minutes of exams in multiple subjects.
I want to graph the frequency of every duration by each subject.
For example, when I tabulate duration if the subject is math
Code:
tab duration if subject==math,mi
Code:
duration in | minutes | Freq. Percent Cum. ------------+----------------------------------- 75 | 255,844 23.32 23.32 90 | 127,314 11.61 34.93 105 | 165,198 15.06 49.99 120 | 66,312 6.05 56.04 180 | 307,021 27.99 84.03 195 | 1 0.00 84.03 255 | 3 0.00 84.03 360 | 1 0.00 84.03 435 | 1 0.00 84.03 . | 175,219 15.97 100.00 ------------+----------------------------------- Total | 1,096,914 100.00
Code:
hist duration if subject =="math"
As you can see, for one that does not have the tabulate output for above from the duration variable, it is very hard to what are the values around 100.
Thus, I want my histogram to present only the listed values of duration and specify them.
It should look like this:
Many Thanks!
Comment