Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Ronan Conroy <rconroy@rcsi.ie> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: axis label font |
Date | Tue, 22 Nov 2011 13:43:55 +0000 |
On 2011 Samh 22, at 02:49, Scott Merryman wrote: > For label size, you can use the -labsize()- option. > > Here is one way to change just the font of -xabel()- : > > sysuse auto > scatter mpg weight, xlabel(,labsize(medlarge)) > gr_edit xaxis1.edit_tick 1 2000 `"{fontface "Tahoma": 2,000}"' 2 3000 > `"{fontface "Tahoma": 3,000}"' 3 4000 `"{fontface "Tahoma": 4,000}"' 4 > 5000 `"{fontface "Tahoma": 5,000}"', tickset(major) Or, without going into editing, you can do it directly. However, alas, I don't know a way of specifying the font just once. I suppose with copy and paste, it's not that time-consuming, but it does look ugly as code: sysuse auto scatter mpg weight, xlabel(2000 `"{fontface "American Typewriter": 2,000}"' /// 3000 `"{fontface "American Typewriter": 3,000}"' /// 4000 `"{fontface "American Typewriter": 4,000}"' /// 5000 `"{fontface "American Typewriter": 5,000}"',labsize(medlarge)) Note that since the font name is in quotes, the entire text has to be in compound double quotes: `" and "' Ronán Conroy rconroy@rcsi.ie Associate Professor Division of Population Health Sciences Royal College of Surgeons in Ireland Beaux Lane House Dublin 2 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/