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
How to deal with non-linear relationships in linear modelsDear all, I estimated a linear regression model on multiply imputed data. I regress income on a ran…
Trimming percentiles within each age categoryHello stata-users, I have come across code for trimming data globally but not what I am specifically…
PPML Prediction, Dependent Variable on Both SidesHi all, I'm using a gravity model to predict migration through PPML. The dependent variable is Migr…
Heckman Process with Multinomial LogitHi, I am looking to estimate a multinomial logit model with sample selection. The selection equatio…
Using mixed model after coarsened exact matching (CEM)I am using coarsened exact matching (CEM) to match my treatment-control groups. As a result, the mat…
Subscribe to:
Post Comments (Atom)
0 Response to Combine Graphs with conditions
Post a Comment