The SAS Output Delivery System and reporting techniques

ODS/rtf -- no legends?

Reply
N/A
Posts: 0

ODS/rtf -- no legends?

When trying to export a graph via ODS in to an RTF file, the legends are not appearing in the output file. I've got a sample of the source file below -- am I missing something that I need, or clearing something that I shouldn't? or is this an issue with the export (using 9.1.3)?

Thanks,
Matt
[pre]

ods listing close;
ods rtf file='7-16-08 vBarVACT-SamplesAdapt2.rtf' bodytitle style=style.rtf;
goptions reset=all border device=java;
goptions gunit=pct noborder cback=white
colors=(ligr dagr black) ctext=black autosize=on;
legend1
label=(Position=top j=center 'TTFD' j=center '(mg/kg BW)
Value=(j=left '0' j=left '100' j=left '340')
across=1 down=3
mode=share
position=(Top right inside);

/*Note: have to edit graph to get legend inside plot--or use "hotfix"*/
proc gchart data=sasuser.IntegLong;
where Sample<11;
vbar TTFD /discrete type=mean mean
sumvar=VACTV
midpoints=0 100 340
Group=Sample
patternid=midpoint
errorbar=Top
noframe
raxis=axis1
maxis=axis2
coutline=black
legend=legend1;
/* modify axes */
axis1 label=(a=90 'Vertical Activity') c=black;
axis2 label=none value=none c=black;
pattern1 value=solid color=ltgray;
pattern2 value=solid color=megr;
pattern3 value=solid color=black;

Title j=c 'Integra Study'
j=c 'Effect of TTFD on Vertical Activity During Adaptation';
Title2 '(3-min Sample Periods #1-#8)';
Title3 '(95% Confidence Limits)';
run;
ods rtf close;
ods listing;
quit;
[/pre]
N/A
Posts: 0

Re: ODS/rtf -- no legends?

Posted in reply to deleted_user
After more fishing around, I
discovered that the legend only prints out on a vbar graph if you
designate subgroup=TTFD in the list of items after the vbar statement,
as well as having pre-defined legend1 and designated legend=legend1 in
the vbar statement. The problem then is that the error bars are
omitted. So, to get around all this and have axis subgroups that were
easier to read, I decided to use a horizontal bar graph (hbar).
Ask a Question
Discussion stats
  • 1 reply
  • 126 views
  • 0 likes
  • 1 in conversation