Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

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


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: Modifying the font size of the labels of a categorical variable
Date   Thu, 24 Jun 2010 13:43:45 +0200

<>

*************
graph bar (sum) sales, over(sector) ///
over(time2, label(labsize(vsmall))) ///
 asyvars stack legend(size(vsmall))
*************


HTH
Martin


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of A Loumiotis
Sent: Donnerstag, 24. Juni 2010 13:39
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: RE: Modifying the font size of the labels of a categorical
variable

Yes. I want to reduce the font size of SECTOR 1 SECTOR 2 and SECTOR 3
in the legend of the categorical variable sector.

Thanks,
Antonis

On Thu, Jun 24, 2010 at 2:35 PM, Martin Weiss <martin.weiss1@gmx.de> wrote:
>
> <>
>
> Are you talking about the entries in the -legend-? I cannot see any other
> labels for the sectors...
>
>
> HTH
> Martin
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of A Loumiotis
> Sent: Donnerstag, 24. Juni 2010 13:31
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Modifying the font size of the labels of a categorical
variable
>
> 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/
>
> *
> *   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/
>

*
*   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/


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index