I was hoping to have a bit of assistance in the formatting of a bar chart.

I’ve created the following 4 indicator variables from a survey where interviewees looked at both financial - and environmental data and then had to report whether each data type had a minor - or major impact on their decisions (code pasted below):
  1. env1 – indicates that environmental data in the case study had only a minor impact on the interviewee
  2. env2 – indicates that environmental data in the case study had a major impact on the interviewee
  3. fin1 — indicates that financial data in the case study had only a minor impact on the interviewee
  4. fin2 – indicates that financial data in the case study had a major impact on the interviewee
Using the code I've pasted below I have the following graph:

Array

However, I would like to make the following changes:
  • I want the financial data (both the count of minor and major impact) to be in blue and the minor data (both the count of minor and major impact) to be in red.
    • In the legend, I would like a blue and red box indicating financial and environmental data respectively.
  • I want the two "major impact" counts on the left with a single title underneath saying "major impact" and the two "minor impact" counts on the right with a single title underneath saying "minor impact".
    • I would like the major impact bars to be separated by a small gap from the minor impact bars.
From my reading online I understand I need to use something equivalent to the "over()" option, but with the way I've generated the variables below I can't work out how to use the over command. Any help would be wonderful!

Thanks!

Current Code:

gen impact_env_data_major=2 if AI=="Major impact on my investment decision"
replace impact_env_data_major=0 if impact_env_data_major==.
gen impact_env_data_minor=1 if AI=="Minor impact on my investment decision"
replace impact_env_data_minor=0 if impact_env_data_minor==.
gen impact_env_data=impact_env_data_major+impact_env_d ata_minor
drop impact_env_data_major impact_env_data_minor AI

gen impact_fin_data_major=2 if Thefourcasestudiesyoujusts=="Major impact on my investment decision"
replace impact_fin_data_major=0 if impact_fin_data_major==.
gen impact_fin_data_minor=1 if Thefourcasestudiesyoujusts=="Minor impact on my investment decision"
replace impact_fin_data_minor=0 if impact_fin_data_minor==.
gen impact_fin_data=impact_fin_data_major+impact_fin_d ata_minor
drop impact_fin_data_major impact_fin_data_minor Thefourcasestudiesyoujusts

tabulate impact_env_data, generate(env)
label variable env1 "Minor Impact (Environmental)"
label variable env2 "Major Impact (Environmental)"
tabulate impact_fin_data, generate(fin)
label variable fin1 "Minor Impact (Finanicial)"
label variable fin2 "Major Impact (Finanicial)"

graph bar (rawsum) fin1 env1 fin2 env2, legend(label(1 "`: var label fin1'" ) label(2 "`: var label env1'" ) label(3 "`: var label fin2'" ) label(4 "`: var label env2'" ))
drop env1 env2 fin1 fin2