Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Stacked Histogram

From   "Nick Cox" <>
To   <>
Subject   st: RE: Stacked Histogram
Date   Tue, 24 Oct 2006 14:21:04 +0100

-tabplot- and -tableplot- from SSC will do 
something similar, arguably better. 

But in general the recipe is: work your 
way towards a -twoway bar-. 

I'll post some example code later. 


Marcello Pagano
> Has anyone got code for allowing a second, categorical 
> variable into the 
> histogram?  What I am thinking of is the freq variable is the primary 
> variable going into the histogram, but there might be a 
> second variable, 
> age, say, categorised as `young' and `old'. Then think of each bar in 
> the histogram displayed as a two colour bar, black and white, 
> say, where 
> the black part represents the proportion of that bar who are 
> young, and 
> the white represents the proportion of that bar who are old. 
> A sort of 
> stacked-bar-meet-histogram kind of plot.

*   For searches and help try:

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