Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: omitting ticks on -twoway- with -by()-


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: omitting ticks on -twoway- with -by()-
Date   Sun, 11 Dec 2005 20:21:18 -0000

Here is a tip I thought I would pass on. On a -twoway- 
plot, whenever an axis shows a categorical variable, 
I often want to suppress the ticks, which to me 
convey the impression of marks on a numerical scale. 
A simple example is 
 
sysuse auto, clear 
scatter rep78 mpg, by(foreign) 
 
If you want to suppress the ticks for -rep78-, 
then the mind springs towards 
 
scatter rep78 mpg, by(foreign) yla(, notick) 
 
but this does not do what you hope it will, as 
the -notick- has no effect. 
 
I owe to Vince Wiggins an assurance that there is 
a good explanation for this rooted in the way that
graphs using -by()- are put together, although it is 
evidently too subtle to be easily explained. 

He patiently pointed out to me that working at the code 
to make this possible is hardly essential, given the 
possible work-around 

scatter rep78 mpg, by(foreign) yla(, tlength(0)) 
 
which perhaps struck you immediately as the solution. 
 
There is no doubt some subtle quasi-philosophical 
distinction between no tick and a tick of zero length, 
but they look pretty similar to me. 

So that's it then: -tlength(0)- is a way to suppress
ticks when more obvious methods fail. 
 
Nick 
[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