Dear All,
I am working on STATA 18.0 with a dataset that includes five dummy variables: untargeted_lr untargeted_red untargeted_imm untargeted_eu untargeted_gendiss.
I would like to present a parsimonious bar chart (graph bar) that shows, on the same graph (so same axis), the percentages of the two categories for each dummy variable, at each of four time points: 2006, 2010, 2014, 2019.
At the moment my code for one variable and four time points is the following:
Graphically, I get the following:

As said, first I am trying to place these four bar charts close to each other on the same axis. Second, I would like to add the other four dummies on the same axis.
I would like to get something like this:

Where on the left I would have the y axis with percentages, the sub-titles under the graphs should indicate each of the 5 dummy variables, and each pair of bars the two categories of each dummy variable in one point in time.
Is it feasible?
Thanks a lot
Mattia
I am working on STATA 18.0 with a dataset that includes five dummy variables: untargeted_lr untargeted_red untargeted_imm untargeted_eu untargeted_gendiss.
I would like to present a parsimonious bar chart (graph bar) that shows, on the same graph (so same axis), the percentages of the two categories for each dummy variable, at each of four time points: 2006, 2010, 2014, 2019.
At the moment my code for one variable and four time points is the following:
Code:
graph bar if voted==1, over(untargeted_lr, gap(0)) asyvars bar(2, fcolor(yellow)) by(year, title("Untargeted voters on Left-Right Dimension")) blabel(bar, format(%4.1f) color(black))
As said, first I am trying to place these four bar charts close to each other on the same axis. Second, I would like to add the other four dummies on the same axis.
I would like to get something like this:
Where on the left I would have the y axis with percentages, the sub-titles under the graphs should indicate each of the 5 dummy variables, and each pair of bars the two categories of each dummy variable in one point in time.
Is it feasible?
Thanks a lot
Mattia
Comment