BookmarkSubscribeRSS Feed
KalaBhairava
Quartz | Level 8

Hello every one,

 

 

I have few dough's on proc sgplots below are my concerns:

 

I am using same code while generating graphs for RTF and PDF but I am not getting   proper output in pdf format which is working good for rtf, please find the attachment,

 

2) why can't we use  image_dpi=200 option in pdf formatted graph, I am getting error while running code and for rtf it's working good, please help me to generate proper PDF graph

Capture.PNG

10 REPLIES 10
KalaBhairava
Quartz | Level 8

Hi ,

 

Sorry I am now to this site and not able to understand process, please find below code which is I used, My main concern is why can't we generated graphs in pdf?,

 


ods graphics on;
ods graphics/reset=all border=off height=3.5in width=9in ;

proc sgplot data=derive.&outdat. noautolegend ;
format TRT01PN trt. avisitn avisit.;
series x=AVISITN y= Estimate /group=TRT01PN markers markerattrs=(size=10 );
keylegend/ title="" location=inside position=TOPLEFT VALUEATTRS=(Size=13pt) across=2 ;

Xaxis type=linear label="Week" VALUEATTRS=(Size=10pt) labelattrs=(size=10pt) display=all interval=auto;

yaxis label="LS mean Change ^{unicode '00B1'x} SE ^{unicode '1d43'x}" minor display=all VALUEATTRS=(Size=13pt) type=linear;
scatter x=AVISITN y= Estimate / group=TRT01PN groupdisplay=cluster clusterwidth=0.4
yerrorlower=low yerrorupper=high markerattrs=(size=10 );


xaxis type=discrete;
xaxistable Number /x=avisitn class=TRT01PN nomissingchar TITLE = "Number of Subjects"
titleattrs=(family="Arial" size=8pt color=black style=normal weight=bold )
/*valueattrs=(family="Arial" size=8pt color=black style=normal weight=bold)*/
labelattrs=(family="Arial" size=8pt color=black style=normal weight=bold);
run;

ods graphics off;
ods pdf close;

 

Kurt_Bremser
Super User

@KalaBhairava wrote:

Hi ,

 

Sorry I am now to this site

 


Please post your whole code (your previous post misses at least the opening ods pdf statement), the log from it (as you state you have an ERROR), and give us some example data in a data step with datalines, so that we can test our suggested solutions.

Use the "little running man" for posting code, and {i} for logs.

KalaBhairava
Quartz | Level 8

ods pdf file="&gout\&outdat..pdf" startpage=no nogtitle nogfootnote ;

 

 

please find above ods statement and my question is is there any specific options need to use graphs when we are generating in pdf?, hope for this entire code not required?

 

when I am using image_dpi= option in ods statement I am getting below errorCapture.PNG

KalaBhairava
Quartz | Level 8

Sure Sir, If it's possible please provide any code for Graphs to generate  in pdf if you generated, I am learning sas prog from some one , so I can't copy from there, 

ballardw
Super User

One thing to consider when creating both PDF and RTF (or other ODS destination output) is that some of the destinations use different default ODS Styles. Which affect practically every element of graphics output: font family, weights, sizes, marker colors, symbols, sizes, etc. etc. etc.

 

The first thing I would attempt if one destination looks 'right' is to use the style from that destination with the others specifying the STYLE= option on the ODS <destination> statement.

KalaBhairava
Quartz | Level 8

can you suggest best style options for pdf format graphs?

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 10 replies
  • 1651 views
  • 0 likes
  • 3 in conversation