Hello,
I am working on my masters thesis and am having some troubles visualizing the data as I would like. I have 15 variable cat_1 to cat_15 that are binary variables 0/1, and I would like to plot them on one single bar graph but only for when the value is 1, not 0. At the moment I have these 15 separate graphs:
graph bar (count) if cat_1 == 1, over(year)
graph bar (count) if cat_2 == 1, over(year)
graph bar (count) if cat_3 == 1, over(year)
graph bar (count) if cat_4 == 1, over(year)
graph bar (count) if cat_5 == 1, over(year)
graph bar (count) if cat_6 == 1, over(year)
graph bar (count) if cat_7 == 1, over(year)
graph bar (count) if cat_8 == 1, over(year)
graph bar (count) if cat_9 == 1, over(year)
graph bar (count) if cat_10 == 1, over(year)
graph bar (count) if cat_11 == 1, over(year)
graph bar (count) if cat_12 == 1, over(year)
graph bar (count) if cat_13 == 1, over(year)
graph bar (count) if cat_14 == 1, over(year)
graph bar (count) if cat_15 == 1, over(year)
Any tips as to how to get these onto the same plot?
Thanks
0 Response to bar chart multiple global ifs
Post a Comment