Dear Statalist,
I have a problem in adding the title for the second y-axis. If I do not use -by()-, stata will display the title for the extra y-axis. The problem is when I use -by()- and ytitle("name",axis(2)) I cannot get the graph with the title of the extra y-axis displayed.
Data I used:
If I typed,
, the title of the extra y-axis length can be displayed.
If I however used -by()- and typed,
, stata by default suppressed the title for extra y-axis length.
I cannot display the title for y-axis length, even if I followed the instruction of stata documentation and typed
.
If I used r2title option by typing
, I will have title show up in both two plots (foreign and domestic). This is not what I want either.
Thus I wonder whether there is one way to make the left plot have title for the first y-axis and right plot have title for the extra y-axis.
Kind regards,
Yugen
I have a problem in adding the title for the second y-axis. If I do not use -by()-, stata will display the title for the extra y-axis. The problem is when I use -by()- and ytitle("name",axis(2)) I cannot get the graph with the title of the extra y-axis displayed.
Data I used:
Code:
sysuse auto, clear sort foreign weight
Code:
twoway line price weight || line length weight, yaxis(2)
If I however used -by()- and typed,
Code:
twoway line price weight, by(foreign) || line length weight, yaxis(2)
I cannot display the title for y-axis length, even if I followed the instruction of stata documentation and typed
Code:
twoway line price weight, by(foreign) || line length weight, yaxis(2) ytitle("Length", axis(2))
If I used r2title option by typing
Code:
twoway line price weight, by(foreign) || line length weight, yaxis(2) r2title("Length")
Thus I wonder whether there is one way to make the left plot have title for the first y-axis and right plot have title for the extra y-axis.
Kind regards,
Yugen
Comment