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: RE: graph bar & colour


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: graph bar & colour
Date   Wed, 19 Jan 2011 18:03:02 +0000

Similarly, I've often been taken aback to read that something is "a rarely used option", but such comments are to be taken as tongue in cheek. In some disciplines' jargon, comments in the Manual are often normative, not descriptive. 

Remember that the Manuals are at least initially written before release, when there can be _no_ data on frequency of usage outside StataCorp, and that -- so far as I know -- no Stata is sending back little signals to StataCorp showing how frequently anything is used. 

The signal is more likely to be "We at StataCorp think that bar charts are often fine in one colour, but for those who want it, we do provide scope for changing to several colours."

Those are, of course, my words, not the manual's. But I've used similar devices in my own help files. 

I don't understand Allan's comment on intensity. 

. graph bar (mean) mpg, over(foreign) asyvars bar(1, color(blue*0.6)) bar(2, color(pink*0.4))

is perfectly legal. 

Nick 
[email protected] 

Allan Reese

I've been drawing a clustered barchart and found a curious comment in
the [G] Manual: "asyvars is seldom specified".

It's curious because this seemed the most obvious way to get coloured
bars to distinguish groups.

   graph bar (count) x, over(gvar1) over(gvar2)

gave the shape of the graph, but all bars are the same colour.  We could
have -separate-d x into the gvar1 groups, but easier to

   graph bar (count) x, over(gvar1) asyvar over(gvar2) 

The spacing can then be adjusted using -gap- or -bargap-

   graph bar (count) x, over(gvar1, gap(5)) asyvar bar(1, col(orange))
... over(gvar2)

Another curiosity: the command allows choice of -color- for each bar but
only an overall -intensity-.

Allan


R Allan Reese
Senior statistician, Cefas
The Nothe, Weymouth DT4 8UB 

Tel: +44 (0)1305 206614 -direct
Fax: +44 (0)1305 206601 

www.cefas.co.uk 




***********************************************************************************
This email and any attachments are intended for the named recipient only.  Its unauthorised use, distribution, disclosure, storage or copying is not permitted.  If you have received it in error, please destroy all copies and notify the sender.  In messages of a non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect those of the organisation from which it is sent.  All emails may be subject to monitoring.
***********************************************************************************


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