Add a 45 degree reference line

1k Views Asked by At

I am trying to add a reference line to my graph. I am building a Lorenz curve, and I want to add the perfect equality curve, aka 45 degree line. This is my code

twoway (line cumulative_share_percent cumulative_population_share), by(country year)

// add 45 degree line

twoway (line cumulative_share_percent cumulative_population_share) (line cumulative_population_share cumulative_population_share), by(country year)

Although it seems to flatten the curve, I know it is because of the scale measures since it makes it to a bigger scale of numbers, therefore the curve disappears. Is there a way I can plot the 45 degree line without altering the measures, so the curve is still visible?

0

There are 0 best solutions below