I have a data structured as follows, and I am using the Stata graph bar guide here.
```
dataex job_search_duration educ_institution gender
----------------------- copy starting from the next line -----------------------
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
input float job_search_duration str103 educ_institution str8 gender
1 "جامعة جازان" "ذكر"
1 "جامعة جازان" "ذكر"
1 "جامعة جازان" "ذكر"
1 "جامعة جازان" "ذكر"
1 "الكليات التقنية" "ذكر"
0 "الكليات التقنية" "ذكر"
1 "جامعة جازان" "ذكر"
```
I am trying to exclude subgroups without any observations from appearing in the bar graph, so I ran the code below.
I thought that by adding (drop if educ_institution==""), I would be able to drop such subgroups but the graph as you can
```
preserve
drop if job_search_duration<1
drop if educ_institution==""
graph hbar (mean) job_search_duration, over(educ_attainment, sort(1) descending) over(gender)
restore
```
```
dataex job_search_duration educ_institution gender
----------------------- copy starting from the next line -----------------------
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
input float job_search_duration str103 educ_institution str8 gender
1 "جامعة جازان" "ذكر"
1 "جامعة جازان" "ذكر"
1 "جامعة جازان" "ذكر"
1 "جامعة جازان" "ذكر"
1 "الكليات التقنية" "ذكر"
0 "الكليات التقنية" "ذكر"
1 "جامعة جازان" "ذكر"
```
I am trying to exclude subgroups without any observations from appearing in the bar graph, so I ran the code below.
I thought that by adding (drop if educ_institution==""), I would be able to drop such subgroups but the graph as you can
```
preserve
drop if job_search_duration<1
drop if educ_institution==""
graph hbar (mean) job_search_duration, over(educ_attainment, sort(1) descending) over(gender)
restore
```

Comment