Dear SAS Community,
Is there a way to fit all these 6 radar graphs I have in one panel, so that I end up with the first 3 radar graphs in one upper row, and the last 3 radar graphs in a lower row? The goal is to fit them in one figure. Please see below my code for each of the individual radar plots. I would greatly appreciate your help!!
data wide;
length DM_range $10;
length Variety $10;
input DM_range $ Variety $ a_texture b_texture c_texture d_texture e_texture f_texture g_texture;
if Variety='LB' then Variety='I49L';
if Variety='Junior' then Variety='I54J';
if Variety='Bumpy' then Variety='I55B';
if Variety='EG' then Variety='I12E';
datalines;
<15 LB 50.00 50.00 66.67 0.00 0.00 50.00 0.00
<15 Bumpy 17.07 31.71 34.15 7.32 0.00 82.93 0.00
<15 BL516 0.00 50.00 25.00 0.00 25.00 50.00 0.00
<15 Hass 0.00 0.00 0.00 0.00 0.00 0.00 0.00
<15 Junior 0.00 0.00 0.00 0.00 0.00 0.00 0.00
<15 GEM 0.00 0.00 0.00 0.00 0.00 0.00 0.00
<15 EG 0.00 0.00 0.00 0.00 0.00 0.00 0.00
15_20 LB 31.52 23.91 33.70 19.57 9.78 51.09 2.17
15_20 Bumpy 18.09 15.96 38.30 8.51 2.13 81.91 1.06
15_20 BL516 10.71 30.36 12.50 23.21 1.79 75.00 5.36
15_20 Hass 43.15 24.32 44.52 6.16 5.48 44.18 2.05
15_20 Junior 0.00 0.00 0.00 0.00 0.00 0.00 0.00
15_20 GEM 19.05 33.33 28.57 9.52 0.00 85.71 4.76
15_20 EG 50.68 23.29 52.05 4.11 1.37 50.68 0.00
20_25 LB 24.73 19.35 40.86 12.90 5.38 48.39 5.38
20_25 Bumpy 32.35 24.71 37.06 7.06 4.71 52.35 2.35
20_25 BL516 26.42 24.53 29.25 2.83 0.94 69.81 3.77
20_25 Hass 47.31 21.51 45.52 6.81 6.81 30.11 3.58
20_25 Junior 49.30 32.39 43.66 16.90 5.63 30.99 1.41
20_25 GEM 20.00 28.00 20.00 6.67 0.00 84.00 0.00
20_25 EG 72.56 31.10 60.98 3.66 1.83 22.56 2.44
25_30 LB 48.33 13.33 51.67 23.33 3.33 26.67 3.33
25_30 Bumpy 25.00 19.44 47.22 0.00 8.33 58.33 2.78
25_30 BL516 34.15 22.93 42.93 7.32 2.44 44.88 3.41
25_30 Hass 61.84 21.71 55.92 6.14 7.68 11.40 2.63
25_30 Junior 60.56 28.33 40.56 5.56 6.11 26.11 2.78
25_30 GEM 59.38 18.75 53.13 0.00 6.25 31.25 6.25
25_30 EG 75.47 26.42 60.38 5.66 3.77 16.98 1.89
30_35 LB 65.22 15.22 63.04 8.70 6.52 14.13 1.09
30_35 Bumpy 0.00 0.00 0.00 0.00 0.00 0.00 0.00
30_35 BL516 54.96 21.37 55.73 1.53 7.63 30.53 3.05
30_35 Hass 66.84 16.84 67.89 2.63 11.05 5.79 2.11
30_35 Junior 58.87 32.62 50.35 10.64 9.93 9.93 0.71
30_35 GEM 60.95 27.62 53.33 6.67 3.81 28.57 2.86
30_35 EG 0.00 0.00 0.00 0.00 0.00 0.00 0.00
>35 LB 0.00 0.00 0.00 0.00 0.00 0.00 0.00
>35 Bumpy 0.00 0.00 0.00 0.00 0.00 0.00 0.00
>35 BL516 0.00 0.00 0.00 0.00 0.00 0.00 0.00
>35 Hass 0.00 33.33 33.33 0.00 33.33 0.00 0.00
>35 Junior 69.62 24.05 58.23 6.33 12.66 3.80 1.27
>35 GEM 51.22 26.83 60.98 9.76 9.76 24.39 0.00
>35 EG 0.00 0.00 0.00 0.00 0.00 0.00 0.00
;
run;
proc sort data=wide out=long;
by DM_range Variety ;
run;
/* Transpose texture */
proc transpose data=long name=texture_label out=long1(rename=(COL1 = texture_value) );
by DM_range Variety ;
var a_texture b_texture c_texture d_texture e_texture f_texture g_texture;
run;
PROC PRINT DATA=long1 ;
RUN ;
/*rename levels if variable texture*/
data longnew;
set long1;
if texture_label = 'a_texture' then texture_label = 'Creamy';
else if texture_label = 'b_texture' then texture_label = 'Mushy';
else if texture_label = 'c_texture' then texture_label = 'Smooth';
else if texture_label = 'd_texture' then texture_label = 'Stringy';
else if texture_label = 'e_texture' then texture_label = 'Dry';
else if texture_label = 'f_texture' then texture_label = 'Watery';
else if texture_label = 'g_texture' then texture_label = 'None';
run;
PROC PRINT DATA=longnew ;
RUN ;
goptions reset=all cback=white border htitle=12pt htext=12pt;
goptions ctext=gray20;
axis1 color=grayde order=(0 to 100 by 25) ;
title1 j=c h=13pt 'Comparison of texture among varieties at DM <15 (relative %)';
proc gradar data=longnew;
where DM_range = '<15' and Variety in ('I49L', 'I55B');
chart texture_label / freq=texture_value ORDERACROSS=FORMATTED
overlay=Variety NOLEGEND
staraxis=(axis1 axis1 axis1 axis1 axis1 axis1 axis1)
spiderweb
noframe
starcircles=(25 50)
cstarcircles=black
cstars=(aqua fuchsia blue)
wstars=(2 2 2)
lstar=(1 1 1)
cframe=white
;
run;
quit;
goptions reset=all cback=white border htitle=12pt htext=12pt;
goptions ctext=gray20;
axis1 color=grayde order=(0 to 100 by 25) ;
title1 j=c h=13pt 'Comparison of texture among varieties at DM 15-20 (relative %)';
proc gradar data=longnew;
where DM_range = '15_20';
chart texture_label / freq=texture_value ORDERACROSS=FORMATTED
overlay=Variety NOLEGEND
staraxis=(axis1 axis1 axis1 axis1 axis1 axis1 axis1)
spiderweb
noframe
starcircles=(25 50)
cstarcircles=black
cstars=(aqua orange red green fuchsia blue)
wstars=(2 2 2 2 2 2 )
lstar=(1 1 1 1 1 1)
cframe=white
;
run;
quit;
goptions reset=all cback=white border htitle=12pt htext=12pt;
goptions ctext=gray20;
axis1 color=grayde order=(0 to 100 by 25) ;
title1 j=c h=13pt 'Comparison of texture among varieties at DM 20-25 (relative %)';
proc gradar data=longnew;
where DM_range = '20_25';
chart texture_label / freq=texture_value ORDERACROSS=FORMATTED
overlay=Variety NOLEGEND
staraxis=(axis1 axis1 axis1 axis1 axis1 axis1 axis1)
spiderweb
noframe
starcircles=(25 50)
cstarcircles=black
cstars=(aqua orange red green fuchsia lime blue)
wstars=(2 2 2 2 2 2 2)
lstar=(1 1 1 1 1 1 1)
cframe=white
;
run;
quit;
goptions reset=all cback=white border htitle=12pt htext=12pt;
goptions ctext=gray20;
axis1 color=grayde order=(0 to 100 by 25);
title1 j=c h=13pt 'Comparison of texture among varieties at DM 25-30 (relative %)';
proc gradar data=longnew;
where DM_range = '25_30';
chart texture_label / freq=texture_value ORDERACROSS=FORMATTED
overlay=Variety NOLEGEND
staraxis=(axis1 axis1 axis1 axis1 axis1 axis1 axis1)
spiderweb
noframe
starcircles=(25 50)
cstarcircles=black
cstars=(aqua orange red green fuchsia lime blue)
wstars=(2 2 2 2 2 2 2)
lstar=(1 1 1 1 1 1 1)
cframe=white
;
run;
quit;
goptions reset=all cback=white border htitle=12pt htext=12pt;
goptions ctext=gray20;
axis1 color=grayde order=(0 to 100 by 25) ;
title1 j=c h=13pt 'Comparison of texture among varieties at DM 30-35 (relative %)';
proc gradar data=longnew;
where DM_range = '30_35';
chart texture_label / freq=texture_value ORDERACROSS=FORMATTED
overlay=Variety NOLEGEND
staraxis=(axis1 axis1 axis1 axis1 axis1 axis1 axis1)
spiderweb
noframe
starcircles=(25 50)
cstarcircles=black
cstars=(aqua orange red fuchsia lime)
wstars=(2 2 2 2 2)
lstar=(1 1 1 1 1)
cframe=white
;
run;
quit;
goptions reset=all cback=white border htitle=12pt htext=12pt;
goptions ctext=gray20;
axis1 color=grayde order=(0 to 100 by 25) ;
title1 j=c h=13pt 'Comparison of texture among varieties at DM >35 (relative %)';
proc gradar data=longnew;
where DM_range = '>35';
chart texture_label / freq=texture_value ORDERACROSS=FORMATTED
overlay=Variety NOLEGEND
staraxis=(axis1 axis1 axis1 axis1 axis1 axis1 axis1)
spiderweb
noframe
starcircles=(25 50)
cstarcircles=black
cstars=(orange red lime )
wstars=(2 2 2)
lstar=(1 1 1)
cframe=white
;
run;
quit;