Stacked Column Bar Plots [message #59683] |
Mon, 07 April 2008 13:40  |
Ryan.
Messages: 77 Registered: March 2006
|
Member |
|
|
Hi All,
Does anyone have or know of IDL code that can create stacked bars in one
plot? I have percentages that I want to plot so the total height will
be the same but I have smaller *stacks* within each column that will
have different values. It is a common way of plotting, so I'm sure it's
out there I just can't seem to find where.
Thanks,
Ryan.
|
|
|
Re: Stacked Column Bar Plots [message #59765 is a reply to message #59683] |
Tue, 08 April 2008 10:54  |
Ryan.
Messages: 77 Registered: March 2006
|
Member |
|
|
Loren Anderson wrote:
> Here's what I do. Let's say there are four different subsets of data
> groups 1 to 4. I plot the entire distribution, then overplot groups 1
> to 3, then overplot groups 1 to 2, then overplot group 1. I use
> plothist in the Astronomy library, but you can substitute with your
> favorite bar plotting program.
>
> plothist, [group1, group2, group3, group4]
> plothist, [group1, group2, group3], /overplot
> plothist, [group1, group2], /overplot
> plothist, [group1], /overplot
>
> -Loren
Thanks Loren,
I've actually found that BAR_PLOT allows you to "adjust" the location
where you start drawing the bar with the BASELINES keyword. I've
written it up but haven't tested it yet.
Plotting all the groups and gradually reducing the groups is a good
idea. I had never thought of that. If my method does not work out I'm
sure to use it =)
Thanks again,
Ryan.
|
|
|
Re: Stacked Column Bar Plots [message #59769 is a reply to message #59683] |
Tue, 08 April 2008 07:40  |
Loren Anderson
Messages: 22 Registered: August 2007
|
Junior Member |
|
|
Here's what I do. Let's say there are four different subsets of data
groups 1 to 4. I plot the entire distribution, then overplot groups 1
to 3, then overplot groups 1 to 2, then overplot group 1. I use
plothist in the Astronomy library, but you can substitute with your
favorite bar plotting program.
plothist, [group1, group2, group3, group4]
plothist, [group1, group2, group3], /overplot
plothist, [group1, group2], /overplot
plothist, [group1], /overplot
-Loren
On Apr 7, 4:40 pm, "Ryan." <rchug...@brutus.uwaterloo.ca> wrote:
> Hi All,
>
> Does anyone have or know of IDL code that can create stacked bars in one
> plot? I have percentages that I want to plot so the total height will
> be the same but I have smaller *stacks* within each column that will
> have different values. It is a common way of plotting, so I'm sure it's
> out there I just can't seem to find where.
>
> Thanks,
> Ryan.
|
|
|