Thu, 09/17/2009 - 09:34 am
I am new to using Igor and am trying to create the attached graph. Unfortunately, I am having little success. Is there a way to do this without manually programming it as an image plot? In either scenario, how would I go about recreating this graph?
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