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]

From |
<Stefan.Gawrich@hlpug.hessen.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: Univariate distribution graphs in a twoway environment? |

Date |
Mon, 7 Oct 2013 13:37:35 +0200 |

Dear Statalisters, I was asked to display the age distributions (e.g. kdensity, histogram ...) of several subgroups in one graph. Age is scaled on the x-axis, another numeric variable on the y-axis. The nearest example I found to explain this is -twoway rcap- : sysuse sp500, clear gen num = _n keep if uniform() <.05 twoway rcap high low num, hor ylabel(,angle(0)) || scatter num close In this case the y-var 'num' defines the vertical position of each rcap. Now exchange each rcap with e.g. a kdensity curve (not available with the given data) and it would be what I'm looking for. The y-var determines the vertical position of each curve but not it's scaling. I didn't find any way to create a graph like this. *** Another example would be to place diagrams inside a graph where x/y determines the position only. Again I don't know how to make this, but I know that -spmap- draws basic diagrams on a map using centroid coordinates. Best wishes Stefan Gawrich Dillenburg Germany * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Univariate distribution graphs in a twoway environment?***From:*Phil Clayton <philclayton@internode.on.net>

- Prev by Date:
**Re: Re - st: Battling Mata docx commands - automation?** - Next by Date:
**Re: st: how to exclude an observation when calculating the median of a group** - Previous by thread:
**st: how to exclude an observation when calculating the median of a group** - Next by thread:
**Re: st: Univariate distribution graphs in a twoway environment?** - Index(es):