|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: bar colours in -graph hbar, over()-
I am using the command
graph hbar (asis) poverty , over(period) over(htype)
where period has 2 categories, and htype has 10 categories. The
command produces a graph exactly in the format I require, except that
I would like the bars for the first period category to be blue, and
the bars for the second period category to be red. How can I do this?
Search of on-line help, [G] manual, and Michael Mitchell's /A visual
guide to Stata Graphics/, has not yielded a solution, but I may have
missed something. Perhaps some -reshape- trick?
FYI the data are as follows
. clist htype period poverty, nolabel
htype period poverty
1. 1 1 21
2. 2 1 24
3. 3 1 60
4. 4 1 8
5. 5 1 18
6. 6 1 13
7. 7 1 46
8. 8 1 23
9. 9 1 13
10. 10 1 27
11. 1 2 19
12. 2 2 19
13. 3 2 48
14. 4 2 9
15. 5 2 14
16. 6 2 13
17. 7 2 38
18. 8 2 25
19. 9 2 12
20. 10 2 22
. lab list htype
htype:
1 All persons
2 Single adult
3 Single adult + child(ren)
4 Couple, no children
5 Couple + child(ren)
6 Couple + adult(s) + child(ren)
7 Single pensioner
8 Pensioner couple
9 Other
10 All children
. lab list period
period:
1 1991-1997
2 1998-2004
. de htype period poverty
storage display value
variable name type format label variable label
htype byte %30.0g htype Household type
period byte %9.0g period Period
poverty byte %8.0g Poverty rate (%)
Stephen
-------------------------------------------------------------
Professor Stephen P. Jenkins <[email protected]>
Director, Institute for Social and Economic Research
University of Essex, Colchester CO4 3SQ, U.K.
Tel: +44 1206 873374. Fax: +44 1206 873151.
http://www.iser.essex.ac.uk
Survival Analysis using Stata:
http://www.iser.essex.ac.uk/teaching/degree/stephenj/ec968/
Downloadable papers and software: http://ideas.repec.org/e/pje7.html
Learn about the UK's new household panel survey, the United Kingdom
Household Longitudinal Study: http://www.iser.essex.ac.uk/ukhls/
*
* 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/