BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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]
1 REPLY 1
deleted_user
Not applicable
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).

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 641 views
  • 0 likes
  • 1 in conversation