Chris, Thanks that's great, just with one line of code. I just have one problem: if the chart has a group variable then the first group's pattern id is repeated for the 2nd group resulting in incorrect colour coding for the 2nd group. See example code below: data test; input trial_group $ phase delta_volts; cards; 'Line1' 1 -0.033 'Line1' 2 -0.042 'Line1' 3 0.039 'Line1' 4 0.008 'Line2' 1 0.013 'Line2' 2 -0.043 'Line2' 3 -0.017 'Line2' 4 -0.081 ;run; data chart; set test; call execute(catt('pattern',_N_,' color=',ifc(delta_volts>0,'red','green'),';')); run; title; axis2 width=2.0 label=(h=1.2 a=90 'Delta volts') value=(h=1.2); proc gchart data=test; vbar phase / group=trial_group mean type=mean space=4 width=10 gspace=8 sumvar=delta_volts discrete patternid=midpoint raxis=axis2; run;quit;
... View more