[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: re: x and y axis in the middle

From   "Nick Cox" <>
To   <>
Subject   st: RE: re: x and y axis in the middle
Date   Sun, 18 Oct 2009 17:57:14 +0100

This assumes, understandably, that your background is white, so that you
want visible but unobtrusive grid lines, so typically choose light gray.

In the book I mentioned earlier, Hadley Wickham uses as a default a
light gray background colour and so white grid lines. You don't need the
book, as you can find examples in various places e.g.

I quite like Wickham's style as refreshingly different, although not for
always. He is talking about a package for R, but the same kind of look
is easy in Stata: 

sysuse auto
#delimit ; 
scatter mpg weight, 
xla(, grid glcolor(white))
yla(, grid glcolor(white))
yla(, ang(h));  

Of course, nothing is compulsory here. If you don't like it, change it
or ignore it! 


Kit Baum

Nick said

Somewhat in his spirit, here is one variation on Kit's style:

... yline(0, lstyle(grid) lw(*2)) xline(0, lstyle(grid) lw(*2))

That is,

1. You can make the extra -yline()- and -xline()- have the same style as
your grid lines.

2. But you can also make them a little more prominent by changing the

Very nice. One thing that you might want to add is something like    
lcolor(gs13)   to make the axes just a bit more prominent than the  
rest of the grid. If you want them even more noticeable, use a number  
lower than 13, and v.v.

*   For searches and help try:

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