georgina
06-23-2010, 12:14 PM
Hello everybody,
I want to realize a twoway scatter plot in STATA, plotting id3 over the price, but I would like the y axis to be ordered from the lowest minimum price to the highest minimum price - now is ordered in alphabetic order of the ylabel. Seems an easy question, but I am really stuck :(
For a better understanding, please see the attached graph. As you can see, each of the 3 years has the same ordering of the y labels, but I wish to order it from lowest to highest minimum price, so I should have a different ordering for each year.
I hope I have been clear enough.
The command I used is:
graph twoway scatter id3 price, by(year) ylabel(1 2 3 4 5 6 7 8 9, valuelabel angle(0)) ytitle("Versions/Brand") xtitle("Price")
id3 has values from 1 to 9, corresponding for each car brand.
Thanks a lot in advance for any suggestion you can give me.
G.
I want to realize a twoway scatter plot in STATA, plotting id3 over the price, but I would like the y axis to be ordered from the lowest minimum price to the highest minimum price - now is ordered in alphabetic order of the ylabel. Seems an easy question, but I am really stuck :(
For a better understanding, please see the attached graph. As you can see, each of the 3 years has the same ordering of the y labels, but I wish to order it from lowest to highest minimum price, so I should have a different ordering for each year.
I hope I have been clear enough.
The command I used is:
graph twoway scatter id3 price, by(year) ylabel(1 2 3 4 5 6 7 8 9, valuelabel angle(0)) ytitle("Versions/Brand") xtitle("Price")
id3 has values from 1 to 9, corresponding for each car brand.
Thanks a lot in advance for any suggestion you can give me.
G.