BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sasgorilla
Pyrite | Level 9

Hi. I've created a proc gradar figure using the following code: 

 

ods escapechar="^";
ods graphics / noborder;
ods  rtf file="&tpath\aim2spider.rtf" style=minimal device=svg;
goptions reset=all border;
axis2 order=(0 to 100 by 25) value=none;
axis3 order=(0 to 100 by 25) value=(tick=1 " " );
title;
proc GRADAR data=radar3 ;
	format var1 var1f.;
	label tl='Status';
	chart var1 / freq=pct overlayvar=tl
	staraxis = (axis3 axis2 axis2 axis2 axis2 axis2 axis2 axis2)
	starinradius=0
	cstars=(black black)
	wstar=(1)
	lstar=(1)
	noframe
	;
	run;
	quit;
ods rtf close;

The figure looks good except that the line/dotted line overlap with the text in the legend area where the overlayvar "status" is depicted. Any ideas on how to get some space there? I've tried adding space in the format values for that variable but that didn't work. 

 

sasgorilla_0-1744495805313.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @sasgorilla,

 


@sasgorilla wrote:

I've tried adding space in the format values for that variable but that didn't work. 


Adding non-breaking spaces ('A0'x, not '20'x) should be a workaround:

After replacing SASHELP.FAILURE in the documentation example with dataset WANT, created as

data want;
length Process $13;
set sashelp.failure;
process='A0A0A0A0'x||process;
run;

the legend looks good:

GRADAR_legend.png

If "No Time-loss" and "Time-loss" in your example are formatted values of variable TL, the non-breaking spaces must go into the format definition, of course:

data fmt;
retain fmtname 'pfmt' type 'C';
start='Process A'; label='A0A0A0A0'x||'No Time-loss'; output;
start='Process B'; label='A0A0A0A0'x||'Time-loss'; output;
proc format cntlin=fmt;
run;

proc gradar data=sashelp.failure;
format process $pfmt.;
...

 

 


@sasgorilla wrote:
ods  rtf file="&tpath\aim2spider.rtf" style=minimal device=svg;

Does device=svg work with ODS RTF? It failed with my SAS 9.4M5 ("WARNING: Unsupported device 'SVG' for RTF destination.") and this is consistent with the documentation "Default Devices for ODS Destinations". But the 'A0'x trick did work in an embedded SVG file created with ODS HTML5. The spacing (with four non-breaking spaces as before) was just a bit different:

HTML with inline SVGHTML with inline SVG

View solution in original post

5 REPLIES 5
sasgorilla
Pyrite | Level 9

It looks like this problem exists even in the sample SAS documentation here. Not sure why it is programmed that way...  unless anyone has any ideas, I ultimately may need to just remove the legend and make me own after exporting.  

 

sasgorilla_0-1744505505827.png

 

Ksharp
Super User
Try to use PROC SGPLOT.
https://blogs.sas.com/content/graphicallyspeaking/2013/11/27/is-there-a-car-on-your-radar/

Or Calling @GraphGuy (a.k.a Robert.Allision) who is good at SAS/GRAPH .
sasgorilla
Pyrite | Level 9

Thanks for the references, @Ksharp . I will explore these further when I have some more time. I appreciate it!

FreelanceReinh
Jade | Level 19

Hi @sasgorilla,

 


@sasgorilla wrote:

I've tried adding space in the format values for that variable but that didn't work. 


Adding non-breaking spaces ('A0'x, not '20'x) should be a workaround:

After replacing SASHELP.FAILURE in the documentation example with dataset WANT, created as

data want;
length Process $13;
set sashelp.failure;
process='A0A0A0A0'x||process;
run;

the legend looks good:

GRADAR_legend.png

If "No Time-loss" and "Time-loss" in your example are formatted values of variable TL, the non-breaking spaces must go into the format definition, of course:

data fmt;
retain fmtname 'pfmt' type 'C';
start='Process A'; label='A0A0A0A0'x||'No Time-loss'; output;
start='Process B'; label='A0A0A0A0'x||'Time-loss'; output;
proc format cntlin=fmt;
run;

proc gradar data=sashelp.failure;
format process $pfmt.;
...

 

 


@sasgorilla wrote:
ods  rtf file="&tpath\aim2spider.rtf" style=minimal device=svg;

Does device=svg work with ODS RTF? It failed with my SAS 9.4M5 ("WARNING: Unsupported device 'SVG' for RTF destination.") and this is consistent with the documentation "Default Devices for ODS Destinations". But the 'A0'x trick did work in an embedded SVG file created with ODS HTML5. The spacing (with four non-breaking spaces as before) was just a bit different:

HTML with inline SVGHTML with inline SVG

sasgorilla
Pyrite | Level 9

Thanks @FreelanceReinh ! This was very helpful. 

 

It did the trick if in my proc format statement I changed the values to: 

 

	VALUE tlf		0='A0A0A0A0'x 'No Time-loss'
					1='A0A0A0A0'x 'Time-loss';

 

Also, you were right about device=svg not working. That was an artifact from copying and pasting some code when trying to troubleshoot. It still would output to rtf but it had changed to 'EMF'. I removed that as well. 

 

 

WARNING: Unsupported device 'SVG' for RTF destination.
         Using default device 'EMF'.

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1200 views
  • 6 likes
  • 3 in conversation