[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: graph bar stacked loop question

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: graph bar stacked loop question
Date   Fri, 15 Jan 2010 18:17:42 -0000

You might be able to fudge this by replacing zeros with smidgens so that
each graph shows a bar for every country but one of negligible height
when the real value is zero. 

[email protected] 

Leandro Brufman

I am running a loop that repeats the same stacked bar graph for
different individuals (`x').

graph bar (sum)  w1pct*, over(report_month) over(report_year) nolabel
stack title(`x') subtitle(Country Composition) nofill

As you can see, the graph shows the variables w1pct* stacked. Those
variables are countries. It shows the evolution of a portfolio country
composition over time, and I am repeating it for different Banks.

I want to have every country with the same colours across Banks, and I
don't know how to do it. I know that Stata assigns keys to each
variable and that I can change that with order(). But the problem is
that some Banks do not have any asset of, say, Angola. So the keys
change from Bank to bank, and colors change as well.

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index