BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I need to put an image at the top of a page. I have the following code:

ods pdf file= "C:\PC_SAS\GRAPH_PAGE4.pdf" startpage=never;
ods escapechar='^';
goptions hsize=3.0 in vsize=3.0 in
ftext='Ariel' htext=2 gunit=pct;
symbol1 v=dot i=join;
proc gchart data=example7;
goptions horigin=0 in vorigin=7.50 in;
title2 'Graph 1 ';
pie3d flavor / sumvar=calories noheading
fill=solid
slice=none
value=outside
clockwise coutline=BL legend=legend1
explode="Apple" "Blueberry";
legend1 label=none position=(left middle) offset=(2, 4) across=1
order=("Apple" "Blueberry") ;
pattern1 color=CX0000FF ;
pattern2 color=CXFF8000 ;
symbol1 interpol=join width=10
font=swiss value=-;
run ;
quit ;

Would it need to go into the ODS statement?
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
When you say that you need to put an image at the top of a page -- do you mean another SAS/GRAPH image or do you mean an image like a company logo???

If you mean a logo, this Tech Support note explains how to do it:
http://support.sas.com/kb/22/245.html

If you need to have a separate SAS/GRAPH image together with the output from the GCHART step, you should investigate PROC GREPLAY.

cynthia
deleted_user
Not applicable
It was for a company logo. I used the osds pdf an inserted the image there, but it shows on all 4 graphs. Is there a work around for that?

ods pdf file= "C:\PC_SAS\GRAPH_PAGE4.pdf" startpage=never;
ods escapechar='^';
ods pdf text='^S={preimage="D:\Documents and Settings\amrapon\Desktop\Report\Logo For Top Of Report.jpg"}';
ods pdf text=' ';
ods pdf text=' ';
goptions hsize=3.0 in vsize=3.0 in
htext=2 gunit=pct;
symbol1 v=dot i=join;
proc gchart data=example7;
goptions horigin=0 in vorigin=7.50 in;
title2 'Graph 1 ';
pie3d flavor / sumvar=calories noheading
fill=solid
slice=none
value=outside
clockwise coutline=BL legend=legend1
explode="Apple" "Blueberry";
legend1 label=none position=(left middle) offset=(2, 4) across=1
order=("Apple" "Blueberry") ;
pattern1 color=CX0000FF ;
pattern2 color=CXFF8000 ;
symbol1 interpol=join width=10
font=swiss value=-;
run ;
quit ;

proc gchart data=example6 ;
goptions horigin=0 vorigin=3.99 in;
title2 'Graph 2';
pie3d flavor / sumvar=calories noheading
fill=solid
slice=none
value=outside
clockwise coutline=BL legend=legend1
explode="Apple" "Blueberry" "Peach" "Cherry" "Pecan";
legend1 label=none position=(left middle) offset=(2, 4) across=1
order=("Apple" "Blueberry" "Peach" "Cherry" "Pecan") ;
pattern1 color=CX0000FF ;
pattern2 color=CX00FF00 ;
pattern3 color=CXFF0000 ;
pattern4 color=CXFF8000 ;
pattern5 color=CXFFFF00;
symbol1 interpol=join width=10
font=swiss value=-;
run ;
quit ;


proc gchart data=example6 ;
goptions horigin=4 in vorigin=7.50 in ;
title2 'Graph 3';
pie3d flavor / sumvar=calories noheading
fill=solid
slice=none
value=outside
clockwise coutline=BL legend=legend1
explode="Apple" "Blueberry" "Peach" "Cherry" "Pecan";
legend1 label=none position=(left middle) offset=(2, 4) across=1
order=("Apple" "Blueberry" "Peach" "Cherry" "Pecan") ;
pattern1 color=CX0000FF ;
pattern2 color=CX00FF00 ;
pattern3 color=CXFF0000 ;
pattern4 color=CXFF8000 ;
pattern5 color=CXFFFF00;
run ;
quit ;

proc gchart data=example8 ;
goptions horigin=4 in vorigin=3.99 in;
title2 'Graph 4';
pie3d flavor / sumvar=calories noheading
fill=solid
slice=none
value=outside
clockwise coutline=BL legend=legend1
explode="Apple" "Blueberry" "Cherry";
legend1 label=none position=(left middle) offset=(2, 4) across=1
order=("Apple" "Blueberry" "Cherry") ;
pattern1 color=CX0000FF ;
pattern2 color=CXFF8000 ;
symbol1 interpol=join width=10
font=swiss value=-;
run ;
quit ;

ods pdf close;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 634 views
  • 0 likes
  • 2 in conversation