Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Modifying the font size of the labels of a categorical variable


From   A Loumiotis <[email protected]>
To   [email protected]
Subject   st: Modifying the font size of the labels of a categorical variable
Date   Thu, 24 Jun 2010 14:31:00 +0300

Hi,
Is there an option in graph bar that I can use to modify the font size
of the labels of a categorical variable when the bars of this variable
are stacked?
Here is an example (modification of an example that Nick Cox has
provided) of what I have in mind:

clear
set obs 1000
egen id = seq(), block(10)
egen time = seq(), to(10)
format time %tq
gen time2=string(time, "%tq")
gen sector = ceil(3 * runiform())
bysort id: replace sector=sector[1]
label define sector 1 "SECTOR 1" 2 "SECTOR 2" 3 "SECTOR 3"
label values sector sector
gen sales=exp(rnormal())*1000
graph bar (sum) sales, over(sector, label(labsize(vsmall)))
over(time2, label(labsize(vsmall))) asyvars stack


The options above for the bar graph adjust the font size of the time2
variable values, but the font size of the labels of the variable
sector that the bars are stacked are not adjusted even though I
believe I have included such an option [ over(sector,
label(labsize(vsmall))) ]  .  What do I do wrong?

Thanks,
Antonis
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index