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]

Re: st: Bar Graph Chart


From   Keniajin Wambui <[email protected]>
To   [email protected]
Subject   Re: st: Bar Graph Chart
Date   Wed, 5 Jun 2013 09:57:22 +0300

using by(region, row(1) iscale(.5) compact)
helped reduce the size of the labels

On Mon, Jun 3, 2013 at 3:08 PM, Nick Cox <[email protected]> wrote:
> (People interested in this kind of thing should also look at the
> thread started by Andrea Bennett
>
> http://hsphsun3.harvard.edu/cgi-bin/lwgate/STATALIST/archives/statalist.1305/date/article-1047.html
>
> including my posts there.)
>
> If you made the labels much smaller, they would be very hard to read.
>
> It seems to me that what you are seeing is an inevitable consequence
> of using a (vertical) bar chart. You run out of space to show text.
>
> Go horizontal! In particular, look at -statplot- on SSC. Here is an example.
>
>  webuse citytemp
>
>  clonevar temp1 = tempjan
>
> clonevar temp7 = tempjuly
>
>  label var temp1 "January"
>
> label var temp7 "July"
>
> statplot temp1 temp7, over(region) over(division) nofill stat(count)
>
>
> Nick
> [email protected]
>
>
> On 3 June 2013 09:33, Keniajin Wambui <[email protected]> wrote:
>> Thanks Nick,
>> graph bar (count) tempjan tempjuly, by(region, row(1)) over(division)
>> asyvars nofill
>> is very close to what I want, but the problem is the label sizes,
>>
>> I am trying over(division ,label(labsize(tiny))) but it still shows
>> the labels large in size.
>>
>> On Fri, May 31, 2013 at 8:03 PM, Nick Cox <[email protected]> wrote:
>>> Is this closer to what you want?
>>>
>>>  graph bar (count) tempjan tempjuly, by(region) over(division) asyvars nofill
>>>
>>> graph bar (count) tempjan tempjuly, by(region, row(1)) over(division)
>>> asyvars nofill
>>> Nick
>>> [email protected]
>>>
>>>
>>> On 31 May 2013 15:02, Keniajin Wambui <[email protected]> wrote:
>>>> Hi All;
>>>> I am using Stata 12 on windows 7. I want to do a bar graph of two
>>>> variables with each bar colored differently according to regions
>>>>
>>>> Using one variable its working perfectly
>>>> webuse citytemp
>>>> graph bar (count) tempjan , over(region) over(division) asyvars stack
>>>>
>>>> but when i try
>>>> webuse citytemp
>>>> graph bar (count) tempjan tempjuly, over(region) over(division) asyvars stack
>>>>
>>>> the over(region) over(division)  both of them are moved to the x-axis.
>>>> How can I make sure the using two variables rremains the same as for
>>>> one variable.
>>>> --
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/



-- 
Mega Six Solutions
Web Designer and Research Consultant
Kennedy Mwai
25475211786
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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