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

Re: st: overlapping histograms

From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: overlapping histograms
Date   Mon, 29 Sep 2008 11:42:48 -0500

Jeph may be acting under orders, i.e. someone is insisting on something like this, but the problem that one obscures the other presumably arises because your distributions are not too different and is likely to persist with any small modifications to the recipe.

In addition to other solutions suggested, -qqplot-, -qplot- (SJ), -distplot- (SJ), -stripplot- (SSC), -beamplot- (SSC) are some commands I would use to compare distributions graphically long before I tried to superimpose histograms.

[email protected]

Jeph Herrin wrote:

I've been trying to create a graph which shows
two overlapping histograms - I'm trying to show
how the distribution for a quantity if interest
has shifted from time A to time B.

Putting two histograms on one graph is not the

 twoway (histogram myvarA) (histogram myvarB)

but the problem is that one obscures the other. I
can make the one on top "clear" (specify -color(none)-)
but because the bars line up it still difficult to
distinguish them. So I'm looking for a way to do

1. make the overlapping areas a darker color than
   either histogram is alone
2. shift the bars for one histogram so that the one
   behind can be seen ever so slightly

Is there a way to do either? Is there a better solution?
*   For searches and help try:

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