Hi,
I created two graphs using the following commands
Graph 1
graph hbar (asis) avg? , over(yaxis,sort(1) descending) ytitle("") ylab(, valuelabel grid) plotregion( margin(large)) plotregion(style(none)) blabel(bar,format(%3.0f)) graphregion(color(white)) bar(1,color(green)) bar(2,color(red)) nolab legend(off) name(left)
Graph 2
graph hbar (asis) score? , over(yaxis) ytitle("") plotregion( margin(large)) plotregion(style(none)) blabel(bar,format(%3.0f)) graphregion(color(white)) bar(1,color(green)) bar(2,color(red)) nolab legend(off) name(right)
Now what I want is;
1. The first graph red bars need to be sorted in descending order as given for the green bars above in graph 1
2. The y-axis values of the graph 2 needs strictly be in the same order as they occurs in the graph 1
3. Combine these graphs into one in such a way that the y-axis occurs only to the left and are not showed in the graph 2 to the right
I tried this "graph combine left right", but it does not work. The y-axis values occur in both graphs.
I need suggestion to improve the command above and work out a combine graph.
Related Posts with Combine Graphs with conditions
Problem Regarding Ommited Variable in Fixed Effects ModelHello everyone, I am currently in my thesis about Sustainability Reporting Quality. Basically i want…
Combine multiple variables (categorical and ordinal ones) into one variable (categorical) for regressionHey people, I want to run a regression with Stata and must change a few variables. There are three …
creating new variables for duplicates observationsHi All, Please I would like to ask you help. I have an unbalanced panel with id, months, years, cour…
gen with differences between observationsDear all, I have the following dataset. I am trying to create a variable that generates 1 when the …
Complex conditions/generationDear all, I am using the following data with permno for all the different companies and the dummy f…
Subscribe to:
Post Comments (Atom)
0 Response to Combine Graphs with conditions
Post a Comment