I run this:
Using Graph Editor, I can add a reference line like this:

I want to add that line using my do-file. I tried this:
That resulted in this:

So I tried
which gave the error
How do I add a horizontal line in my do-file, instead of using Graph Editor?
Code:
sysuse auto, clear graph hbar price, over(foreign)
I want to add that line using my do-file. I tried this:
Code:
graph hbar price, over(foreign) yline(50)
So I tried
Code:
graph hbar price, over(foreign) xline(50)
Code:
xlines(50) not allowed, xaxis1 does not exist
Comment