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
Can I extract few letters from a string variable based on a conditional is another string variable?Dear Statalists, I have a dataset including six variables: ID PersonName ExcelPersonID CompanyName …
STATA putdocxHi everyone, I am trying to create a report with putdocx. I have managed to put percentages in a tab…
Distribution Dependent variableHello, does someone know how to determine the distribution of the dependent variable? I am not sure…
Oaxaca-Blinder command. Statistical significance of the components.Hi everyone, I am a current user of Oaxaca command and I don't know how Stata calculates (with which…
many-to-many merge problemHi, I have the following data that I want to merge: Master dataset: statalist_data4.dta Code: * Ex…
Subscribe to:
Post Comments (Atom)
0 Response to Combine Graphs with conditions
Post a Comment