Help using Base SAS procedures

PROC GRADAR Output

Reply
New Contributor
Posts: 2

PROC GRADAR Output

Hi

I use PROC GRADAR with SAS 9.1 to produce spider graphics with min and max values between 0.05 and 1.
I need both activex and gif outputs for html and pdf.


data work.radar1;
input name $ 1 points 5-8 maxv 13;
datalines;
A 0.23 1
B 0.05 1
C 0.18 1
D 0.05 1
E 0.32 1
F 0.3 1
G 0.05 1
H 1 1
run;

data work.radar2;
input name $ 1 points 5-8 maxv 13;
datalines;
A 0.23 1
B 0.05 1
C 0.18 1
D 0.05 1
E 0.32 1
F 0.3 1
G 0.05 1
H 0.3 1
run;

goptions reset=all;
goptions device=gif;

proc gradar data=work.radar1;
chart name / freq=points
spiderweb
starfill=(solid)
cstarfill=(lightblue)
;
run;
quit;

proc gradar data=work.radar2;
chart name / freq=points
spiderweb
starfill=(solid)
cstarfill=(lightblue)
;run;
quit;


goptions reset=all;
goptions device=activex;

ods listing close;
ods html file='d:\temp\test.html';

proc gradar data=work.radar1;
chart name / freq=points
spiderweb
starfill=(solid)
cstarfill=(lightblue)
;
run;
quit;

proc gradar data=work.radar2;
chart name / freq=points
spiderweb
starfill=(solid)
cstarfill=(lightblue)
;run;
quit;

ods html close;
ods listing;


The problem is that activex and gif output are not identical. The activex output produces graphs with the same scale even if the min and max value are not the same, so that you can visually compare graphs with different values. The gif output takes the max value (e.g. 1 or 0.5) as the max value for the tick on the graph so that you cannot visually compare both graphs.

Is there a way to produce graphs with PROC GRADAR with the same scale for activex and gif so that both graphs can be compared.

Thanks
Eddy
SAS Super FREQ
Posts: 8,781

Re: PROC GRADAR Output

Hi:
This may be a question for Tech Support about the difference between GIF and ACTIVEX. I have no clue about that.

I have one suggestion that may make the GIF unnecessary and that's instead of device=gif, try device=ACTXIMG . ACTXIMG is a "static" device driver that will have the look and feel of ACTIVEX output (colors, fonts, and hopefully, sizes), but will not have the interactivity of the ACTIVEX graph.

You'll need to add a GPATH to your ODS HTML program, so you can find the PNG file created by ODS HTML (otherwise, the HTML file will be in D:\temp and the PNG file will be in your working directory. But then when your job is over, look in d:\temp folder for the graph.png and graph1.png files (or graph10.png and graph11.png files). If you use the NAME= option, as shown in the code below, then you should be able to find the PNG files in your d:\temp\ folder because they will have that name with a number appended to the name:

When I ran a quick test, the PNG file created by ACTXIMG driver and the output from the ACTIVEX driver looked the same.

cynthia

Suggested program changes:
[pre]
ods listing close;

**1) Use ACTIVEX driver;
goptions reset=all;
goptions device=activex;

ods html file='d:\temp\test_acx.html' style=sasweb;

** put your two gradar steps here;

ods html close;


** 2) Use ACTXIMG driver;
goptions reset=all;
goptions device=actximg;

ods html path='d:\temp' (url=none)
gpath='d:\temp' (url=none)
file='test_acximg.html' style=sasweb;

proc gradar data=work.radar1;
chart name / freq=points
spiderweb
starfill=(solid)
cstarfill=(lightblue)
name='aaa'
;
run;
quit;

proc gradar data=work.radar2;
chart name / freq=points
spiderweb
starfill=(solid)
cstarfill=(lightblue)
name='bbb'
;
run;
quit;

ods html close;
ods listing;

[/pre]
New Contributor
Posts: 2

Re: PROC GRADAR Output

Thank you Cynthia.

I forgot to tell that the reason why I need gif output is because I generate the pdf on Unix Solaris SAS 9.1.3 SP4 and that ACTXIMG is not supported on this platform.

Tech Support gives me following answer to the problem:

The ORDER option on the AXIS statement is not supported by PROC GRADAR. There is not an option to specify the range for the individual spokes.
Excerpt from the SAS OnlineDoc documented under the AXIS statement and ORDER option:

"This option is not supported by the GRADAR procedure."
SAS Super FREQ
Posts: 8,781

Re: PROC GRADAR Output

And I just got this message: [pre]
ERROR: PROC GRADAR does not support DEVICE=JAVAIMG.[/pre]

so switching to JAVAIMG is not an option.

The only (and it's a remote) possibility would be to try to ANNOTATE the whole thing for the GIF form and/or use the DSGI (data set graphics interface) to control drawing the image. But those are both long shots. I know that folks have done amazing output with ANNOTATE or DSGI, but they each come with a learning curve.

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 259 views
  • 0 likes
  • 2 in conversation