I have used the following code to generate two seperate graphs. How do I combine the two graphs onto one by generating a 2nd Y-Axis as I'd like to show the relationship of the two line graphs together?
egen meanCEOTotalCompensation = mean(CEOTotalCompensation), by(Year)
egen meanShareholderReturn = mean(ShareholderReturn), by(Year)
egen tag = tag(Year)
twoway connected meanCEOTotalCompensation Year if tag, sort
twoway connected meanShareholderReturn Year if tag, sort
Any help would be greatly appreciated!
Related Posts with How to generate 2nd Y-axis for Having two connected line graphs on one graph
Post estimation with endogenous switching regressionsDear STATALIST, I am using an endogenous switching regression model to understand how selection aff…
[new on SSC] ineqord: module to calculate indices of inequality and polarization for ordinal dataWith thanks as ever to Kit Baum, ineqord is now available on SSC. Its functionality is described bel…
removing the first character of a string variable if it is zeroHi everyone, How can I remove the first character(s) of values if they are zero? For example, I woul…
Getting exact numbers when extracting p-values from ttestsHello, I wrote code that uses local macros and matrices to extract p-values from many ttests, and o…
New variable: link individuals to their respective householdsHi guys, I have an assignment which consists on the following. I merged two datasets. One contained…
Subscribe to:
Post Comments (Atom)
0 Response to How to generate 2nd Y-axis for Having two connected line graphs on one graph
Post a Comment