comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Stacked Column Bar Plots
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Stacked Column Bar Plots [message #59683] Mon, 07 April 2008 13:40 Go to next message
Ryan. is currently offline  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 Go to previous message
Ryan. is currently offline  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 Go to previous message
Loren Anderson is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDLgrWindow zoomIn bug?
Next Topic: fastest way to find the first non-zero value in an array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:30:02 PDT 2025

Total time taken to generate the page: 0.00858 seconds