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

From |
Leandro Brufman <[email protected]> |

To |
[email protected] |

Subject |
Re: st: RE: graph bar stacked loop question |

Date |
Tue, 19 Jan 2010 10:08:47 -0500 |

Thanks Nick, it worked perfectly, now every country's bar has the same color for each one of the graphs. One additional question: I would like to suppress the legend, as it is the same for every graph. But at the same time I would like to have it somewhere (maybe on an empty graph with only the legend of the previous graphs) as a reference. If I leave it as it is now, every graph has the legend, and besides it is redundant, it is a big legend that distorts the graph proportions. But if I set - legend(off) - I don't know what does each color mean. Any suggestions? On Fri, Jan 15, 2010 at 1:17 PM, Nick Cox <[email protected]> wrote: > 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. > > Nick > [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: > * 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/

**Follow-Ups**:**RE: st: RE: graph bar stacked loop question***From:*"Nick Cox" <[email protected]>

**Re: st: RE: graph bar stacked loop question***From:*Maarten buis <[email protected]>

**References**:**st: graph bar stacked loop question***From:*Leandro Brufman <[email protected]>

**st: RE: graph bar stacked loop question***From:*"Nick Cox" <[email protected]>

- Prev by Date:
**AW: st: How to make a for "loop" when the counter is a variabe** - Next by Date:
**Re: st: RE: graph bar stacked loop question** - Previous by thread:
**st: RE: graph bar stacked loop question** - Next by thread:
**Re: st: RE: graph bar stacked loop question** - Index(es):

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