I want to make a twoway
bar graph that plots a number against a date.
I want to manipulate the length of the x-axis
and the labels and ticks. I tried to enter the dates in different formats into the xscale()
and the xlabel()
options, but keep getting the following errors:
range() invalid - invalid numlist error
and
invalid label specifier
I tried entering the dates in different formats:
clear
input date number
16743 116
16835 384
17034 152
17113 267
17191 939
17246 372
17265 443
17302 406
17498 210
end
format date %tdnn/dd/CCYY
twoway bar number date , ///
xscale(range(11/3/2005 (100) 11/28/2007)) ///
xlabel(11/3/2005 1/25/2007 11/28/2007)
I also tried the following:
twoway bar number date , ///
xlabel(mdy(11,3,2005) mdy(1,25,2007) mdy(11,28,2007) , format(%tdnn/dd/CCYY))
How do I refer to dates in xscale()
and xlabel()
?
I want the dates to have the same format as the x-axis
variable.