Hello everyone! I am creating an epidemic curve using the histogram function. I have successfully created a graph, however there is a space (gap) between the 1st bin (dated 26sep2021) and the y axis. I'd like the 1st bin to start at 0 (no gap). I tried using the xscale(range option but it does not seem to work. I am using Stata version 14.2 on Windows 10. Any insights? Thank you!
For additional information, the earliest Date of Onset is 26sep2021 and last date is 15nov2021. I just used the DD for the x-axis tick labels because I will be adding a text box under the dates to indicate the month (and move the Date of Onset x axis label lower). 
Code:
histogram date_onset, bin(17) frequency fcolor(dknavy) lcolor(dknavy) lpattern(blank) ytitle(No. of Cases) ytitle(, orientation(horizontal)) ylabel(, angle(horizontal) nogrid) xtitle(Date of Onset) xlabel(#17, format(%tdDD)) graphregion(margin(large) fcolor(white))
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte age str6 sex float date_onset 49 "male" 22549 71 "male" 22551 15 "female" 22552 58 "female" 22552 22 "male" 22552 22 "male" 22552 1 "male" 22552 30 "female" 22552 25 "male" 22552 5 "male" 22553 12 "female" 22553 33 "male" 22554 28 "male" 22554 82 "female" 22554 20 "male" 22554 10 "male" 22554 21 "female" 22554 21 "female" 22554 12 "female" 22554 23 "female" 22554 end format %td date_onset
Comment