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
Creating bar chart with multiple binary variablesHi, I am attempting to create a bar chart in Stata that shows proportions for multiple different bin…
miliseconds datetime convertionHi , my dataset has a datetime string like this: Code: clear input str28 activityDateTime "2022-1…
gen var1=var2, generates some wrong values Code: gen geo3= geo3_bd2001 gives the following values. I wonder what might cause this. Any idea pl…
Analysing which colour contributes to the greatest price premiumHi Everyone, I hope you're well! I am trying to observe what colours have the greatest price premi…
esttab summary stats tableHello, I am using estout package to create my summary stats table. I only want the stats for one v…
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