Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Question about graph twoway and ytitle


From   "Svend Juul" <[email protected]>
To   <[email protected]>
Subject   Re: st: Question about graph twoway and ytitle
Date   Fri, 22 Dec 2006 13:20:41 +0100

Alan wrote:
I am using Stata/SE 9.2 for Windows and the s2color graphics scheme.
If I create a graph like the following:
   sysuse auto
   twoway(scatter mpg weight)
Both the X and Y axes are labeled with the variable labels.
 
If I create the following graph:
   twoway (scatter mpg weight) (lfit mpg weight)
Only the X axis is labeled and there is a legend.  I would still like
both X and Y axes to be labeled by default (I am creating a custom
scheme based on s2color) and after searching through the help file on
"scheme entries" I am stumped about how to control this behavior.
Can someone point me in the right direction?
-------------------------------------------------------
 
This has nothing to do with the scheme used. When you create two plots within one graph, Stata is uncertain about which plot should determine the y-axis title. You can decide it with the ytitle() option:
   twoway (scatter mpg weight) (lfit mpg weight) , ytitle("Mileage (mpg)")
 
Hope this helps
Svend
 
________________________________________________________ 
 
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6 
DK-8000 Aarhus C,  Denmark 
Phone, work:  +45 8942 6090 
Phone, home:  +45 8693 7796 
Fax:          +45 8613 1580 
E-mail:       [email protected] 
_________________________________________________________ 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index