Data visualization with SAS programming

Image at top of page In Sas graph

Reply
N/A
Posts: 0

Image at top of page In Sas graph

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?
SAS Super FREQ
Posts: 8,820

Re: Image at top of page In Sas graph

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
N/A
Posts: 0

Re: Image at top of page In Sas graph

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;
Ask a Question
Discussion stats
  • 2 replies
  • 147 views
  • 0 likes
  • 2 in conversation