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: Specifying barlook_option on sorted bar graph


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Specifying barlook_option on sorted bar graph
Date   Thu, 7 Apr 2011 09:20:54 +0100

But a basic misunderstanding here is that with your example syntax the
first bar look is associated with the first variable being shown --
not the first bar.

On Thu, Apr 7, 2011 at 9:04 AM, Nick Cox <[email protected]> wrote:
> What you seek appears in essence to be what is being done -- in
> various ways -- in the thread started by Stephen Jenkins yesterday.
>
> Nick
>
> On Thu, Apr 7, 2011 at 2:03 AM, Mathew Kiang <[email protected]> wrote:
>
>> It seems like it should be a simple command, but I've given up in
>> frustration and turn here for help.
>>
>> I'd like to make a series simple bar graphs (let's say two graphs), one
>> variable at a time (let's say mpg then cost) over a categorical variable
>> (e.g., carmodel), sorted in descending order for each; however, the catch is
>> I want a specific car model differentiated in both graphs (via one of the
>> barlook_options).
>>
>> graph bar mpg, over(carmodel, sort(1) descending)
>> graph bar cost, over(carmodel, sort(1) descending)
>>
>> As far as I can tell, when I use a barlook_option like bar(#, color()), I
>> have to specify the #th bar, which may not be the same across both graphs. I
>> could go back and manually change each, but this quickly gets tedious with
>> many different models or many different graphs.
>
*
*   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