Dear Statalist users
While preparing the bar graph, I want to label the point of intersection of X and Y (origin) in the bar graph as the first entry of the date variable (Starting Date) which is 25feb2022, and at last/end of the x-axis as the last date which is 22mar2022.
Data is
* Example generated by -dataex-. To install: ssc install dataex
clear
input long site1 float(date week1)
1 22701 1
1 22720 4
1 22714 3
1 22715 3
1 22715 3
1 22715 3
1 22718 4
1 22718 4
1 22720 4
1 22720 4
1 22725 5
1 22726 5
3 22722 4
3 22726 5
2 22719 4
2 22720 4
2 22721 4
2 22721 4
end
format %td date
label values site1 site
label def site 1 "A", modify
label def site 2 "B", modify
label def site 3 "C", modify
The code I have used is
graph hbar (count), over(site1) over(week1) bar(1, fcolor(navy)) blabel(bar) ytitle(Count) title("My Name is Manoj") xlabel(min(date1) max(date))
but it showing me error
Anticipating your help as always
Ashish
While preparing the bar graph, I want to label the point of intersection of X and Y (origin) in the bar graph as the first entry of the date variable (Starting Date) which is 25feb2022, and at last/end of the x-axis as the last date which is 22mar2022.
Data is
* Example generated by -dataex-. To install: ssc install dataex
clear
input long site1 float(date week1)
1 22701 1
1 22720 4
1 22714 3
1 22715 3
1 22715 3
1 22715 3
1 22718 4
1 22718 4
1 22720 4
1 22720 4
1 22725 5
1 22726 5
3 22722 4
3 22726 5
2 22719 4
2 22720 4
2 22721 4
2 22721 4
end
format %td date
label values site1 site
label def site 1 "A", modify
label def site 2 "B", modify
label def site 3 "C", modify
The code I have used is
graph hbar (count), over(site1) over(week1) bar(1, fcolor(navy)) blabel(bar) ytitle(Count) title("My Name is Manoj") xlabel(min(date1) max(date))
but it showing me error
Anticipating your help as always
Ashish
Comment