JimProuty This can be done by combining 4 category plots in one graph (using multiple bottom axes, one per category plot). The stacked bars can be done by using either Draw to Next Grouping (what I used) or Stack on Next, depending on what data you're starting with. The coloring/shading can be done using color as f(z). Here's the recreation macro of an example of only one of the four category plots: Window Graph0() : Graph PauseUpdate; Silent 1 // building window... Display /W=(96,176.75,490.5,485) wave4,wave3,wave2,wave1,wave0 vs textWave0 ModifyGraph rgb(wave3)=(65280,0,52224),rgb(wave2)=(0,12800,52224),rgb(wave1)=(0,52224,0) ModifyGraph hbFill(wave3)=2,hbFill(wave2)=2,hbFill(wave1)=2,hbFill(wave0)=2 ModifyGraph toMode=1 ModifyGraph zColor(wave4)={wave4fz,0,8,Grays,1},zColor(wave3)={wave2fz,0,8,Grays,1} ModifyGraph zColor(wave2)={wave2fz,0,8,Grays,1},zColor(wave1)={wave1fz,0,8,Grays,1} ModifyGraph zColor(wave0)={wave0fz,0,8,Grays,1} SetAxis/A/E=1 left EndMacro The fake data I used was this: textWave0 wave0 wave1 wave2 wave3 wave4 wave0fz wave1fz wave2fz wave3fz wave4fz E 1 2 4 10 20 4 2 2.8 1.5 0.5 NE 1 2 4 10 20 7 6 1 2.5 1.1 NNE 1 2 4 10 20 7.5 6 3 2.8 1.7 Note the trace order: I put the waves with the biggest values in the "back" by appending them to the graph before the waves with smaller values. Software Engineer, WaveMetrics, Inc. Attachments fzCategoryPlot.png (42.7 KB) Log in or register to post comments September 17, 2009 at 12:04 pm - Permalink
DeannaM Thanks! This worked exceptionally well. Log in or register to post comments September 17, 2009 at 06:28 pm - Permalink
The stacked bars can be done by using either Draw to Next Grouping (what I used) or Stack on Next, depending on what data you're starting with.
The coloring/shading can be done using color as f(z).
Here's the recreation macro of an example of only one of the four category plots:
PauseUpdate; Silent 1 // building window...
Display /W=(96,176.75,490.5,485) wave4,wave3,wave2,wave1,wave0 vs textWave0
ModifyGraph rgb(wave3)=(65280,0,52224),rgb(wave2)=(0,12800,52224),rgb(wave1)=(0,52224,0)
ModifyGraph hbFill(wave3)=2,hbFill(wave2)=2,hbFill(wave1)=2,hbFill(wave0)=2
ModifyGraph toMode=1
ModifyGraph zColor(wave4)={wave4fz,0,8,Grays,1},zColor(wave3)={wave2fz,0,8,Grays,1}
ModifyGraph zColor(wave2)={wave2fz,0,8,Grays,1},zColor(wave1)={wave1fz,0,8,Grays,1}
ModifyGraph zColor(wave0)={wave0fz,0,8,Grays,1}
SetAxis/A/E=1 left
EndMacro
The fake data I used was this:
E 1 2 4 10 20 4 2 2.8 1.5 0.5
NE 1 2 4 10 20 7 6 1 2.5 1.1
NNE 1 2 4 10 20 7.5 6 3 2.8 1.7
Note the trace order: I put the waves with the biggest values in the "back" by appending them to the graph before the waves with smaller values.
Software Engineer, WaveMetrics, Inc.
September 17, 2009 at 12:04 pm - Permalink
September 17, 2009 at 06:28 pm - Permalink