-1

I have a survey data baseline and endline. I am trying to plot bar plot for qualification of the respondent in each group (baseline/endline).

I am using the following code:

 graph bar, over(qualification) over(time)

It is giving me different output from what I want. my output I want the bars for endline and baseline for each category to be present parallel.

I am also attaching a reference picture to get the better idea about what I want.output which I want

Asra Khalid
  • 177
  • 1
  • 18
  • It seems that you want percentages but are not asking for them in your syntax. Other than that, you don't give a reproducible example. – Nick Cox Jul 15 '20 at 13:03

1 Answers1

1

The order of the over options of graph bar matters.

Consider this example:

clear
input x str1 a b
1 "a" 1
2 "a" 2
3 "b" 1
4 "b" 2
end

graph bar x, over(a) over(b) title("over(a) over(b)")
graph bar x, over(b) over(a) title("over(b) over(a)")

example1 example2

It looks like you need to swap the order of your over options.

Wouter
  • 3,201
  • 6
  • 17