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: twoway bar [was: Re: st: Features for Stata 14]


From   Yuval Arbel <[email protected]>
To   statalist <[email protected]>
Subject   Re: twoway bar [was: Re: st: Features for Stata 14]
Date   Wed, 4 Sep 2013 10:05:13 -0700

Hi Scott, and many thanks.Now it looks much better.

Let me try to clarify again the second question:

The current graph displays 6 bars (two bars for each index category 1, 2 and 3):

For each category the thick (blue) bar is red_proj; and the thin
(pink) bar is the months. Also the latter bar is inside the area of
the former.

I would not like to have one bar inside the other - but rather - the
two bars (pink and blue for each category) adjacent to each other. I
would also like to have the same thickness for both adjacent bars.

Is it possible to shape the graph based on these requirements?

On Wed, Sep 4, 2013 at 9:29 AM, Scott Merryman <[email protected]> wrote:
> Regarding the first question:  For some reason Stata is setting the
> minimum for the yaxis at .5.  If you use -ylabel()- this appears to
> correct the problem:
>
> clear
> input index proj_red months
> 1 .4763174 24.46892
> 2 .7769159 68.40548
> 3 .7805855 45.94017
> end
>
> twoway bar proj_red index , barwidth(.5)  ///
>  || bar months index, yaxis(2) barwidth(0.2) ///
>  ||  , ylabel(.4(.1).8) xlabel(1(1)3)
>
>
> The second question is not clear to me
>
> Scott
>
> On Wed, Sep 4, 2013 at 10:38 AM, Yuval Arbel <[email protected]> wrote:
>> Clayton,
>>
>>  I tried the twoway graph based on the following command
>>
>> twoway bar proj_red index || bar months index, yaxis(2) barwidth(0.2)
>>
>> and the following data
>>
>> index proj_red months
>> 1 .4763174 24.46892
>> 2 .7769159 68.40548
>> 3 .7805855 45.94017
>>
>>
>> but there are two problems:
>>
>> 1. I don't see in the graph proj_red=0.476 for index=1
>>
>> 2. i would like to have two adjacent bars of proj_red and months for
>> index=1, 2, 3 and both with the same length. What I'm getting now is a
>> very thick proj_red blue bars.
>>
>> Are there any remedies to these problems?
>>
> *
> *   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/



-- 
Dr. Yuval Arbel
School of Business
Carmel Academic Center
4 Shaar Palmer Street,
Haifa 33031, Israel
e-mail1: [email protected]
e-mail2: [email protected]
You can access my latest paper on SSRN at:  http://ssrn.com/abstract=2263398
You can access previous papers on SSRN at: http://ssrn.com/author=1313670
*
*   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