Hello,
I am trying to create a stacked bar chart (categories: vaccinated and unvaccinated) where each bar represents a day over an influenza season (i.e., a standard epicurve). Because I cannot find options to 'stack' a histogram in Stata, I am using a stacked bar chart ('graph bar'). I am running Stata SE 15 on a Mac and simultaneously Stata MP 15.1 through a virtual Windows desktop.
I am using the following code:
I am fairly close to what I want, but have an x-axis label problem (see attached).

I know there is an option to recode the values on the x-axis, but there are thousands here, and I don't want them. How can I 1) recode the value labels and 2) simultaneously reduce the number that is being shown (for example, show only the month or the year), while still showing the data by day?
The usual pre-emptive apologies apply to those of us for whom an answer is obvious. I am grateful for your suggestions and help.
Maria
I am trying to create a stacked bar chart (categories: vaccinated and unvaccinated) where each bar represents a day over an influenza season (i.e., a standard epicurve). Because I cannot find options to 'stack' a histogram in Stata, I am using a stacked bar chart ('graph bar'). I am running Stata SE 15 on a Mac and simultaneously Stata MP 15.1 through a virtual Windows desktop.
I am using the following code:
Code:
graph bar unvax_cases vax_cases, over(specimen_date) stack
I know there is an option to recode the values on the x-axis, but there are thousands here, and I don't want them. How can I 1) recode the value labels and 2) simultaneously reduce the number that is being shown (for example, show only the month or the year), while still showing the data by day?
The usual pre-emptive apologies apply to those of us for whom an answer is obvious. I am grateful for your suggestions and help.
Maria
Comment