BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8
The output from proc print moves up or down based upon the value of y= in ODS region.
However, the output from proc gbarline does not seem to be effected by ods region values.
Any suggestions?
Thank you.

goptions reset=all;
GOPTIONS DEVICE=activex;
options nodate nonumber orientation=portrait;
goptions rotate=landscape;
ods pdf file="C:\Documents and Settings\SASCode\YTD_Injury\TDBU_YTD.pdf"
;

*
*other procedures go here;
*

ODS PDF STARTPAGE=NOW;

%macro gbarprint(div);
goptions rotate=landscape;
footnote;title;
axis1 label=('Percentage') length=4 in;
axis2 label=('Injury Count') ;
axis3 length=4.5 in;
symbol1 i=join c=black v=dot;
symbol2 i=join c=green v=dot;
legend1 label=('') value=('YTD %') frame;
legend2 label=none across=1 position=(bottom center outside) repeat=1 cframe=white;
pattern1 v=solid c=orange;
pattern2 v=solid c=lightblue;
title1 h=3 "&div.";
ods layout start;
ODS region x=0.5 in y=2 in height = 3.5 in width = 4 in;
proc gbarline data=div_mo3;
title "&div.";
bar inj_mo/ sumvar=pernw legend=legend1
discrete raxis=axis1 maxis=axis3 midpoints="Jan" "Feb";
plot / sumvar=sum_osha raxis=axis2 legend=legend2;
plot / sumvar=sum_lost raxis=axis2;
plot / sumvar=sum_non raxis=axis2;
plot / sumvar=sum_res raxis=axis2;
where inj_yr in ("2010") and div in ("&div.");
format inj_mo $monthf.;
run;
quit;
ODS region x=3.5 in y=3 in height = 3.5 in width = 5 in;
proc print data=div_mo3 label noobs;
title "&div.";
var inj_mo pernw sum_osha sum_lost;
where inj_yr in ("2010") and div in ("&div.");
format inj_mo $monthf.;
run;
ods layout end;
%mend;
%gbarprint(NW Div);
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
ODS LAYOUT (and ODS REGION) are still experimental or "pre-production" with SAS. You might wish to work with Tech Support on this question.

cynthia

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 1 reply
  • 718 views
  • 0 likes
  • 2 in conversation