Data visualization with SAS programming

how export Graph to JPEG image in sas EG

Accepted Solution Solved
Reply
Contributor
Posts: 70
Accepted Solution

how export Graph to JPEG image in sas EG

Hi, i would like to export() Graph as a image(JPEG,PNG).

 

Below is the code which ia am trying but it is not saving the file path wich i mentioned .

filename graphout 'C:\Users\sivakumar.sivaraj\Downloads\test.png';

 

goptions reset=all device=png gsfname=graphout;

 

proc gplot data=sashelp.class;
plot height*weight;
run;

quit;

 

Log:

NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
22
23 GOPTIONS ACCESSIBLE;
24 filename graphout 'C:\Users\sivakumar.sivaraj\Downloads\test.png';
25 goptions reset=all device=png gsfname=graphout;
26
27 proc gplot data=sashelp.class;
28 plot height*weight;
29 run;

NOTE: 9543 bytes written to C:\Users\SIVAKU~1.SIV\AppData\Local\Temp\SAS Temporary Files\_TD27552_AGSCHTD05-SASPR_\Prc2\gplot2.png.
30
31 quit;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE GPLOT used (Total process time):
real time 0.13 seconds
cpu time 0.14 seconds

 

 

 

 


Accepted Solutions
Solution
‎01-31-2018 10:26 AM
Occasional Contributor
Posts: 16

All Replies
Super User
Super User
Posts: 9,840

Re: how export Graph to JPEG image in sas EG

[ Edited ]
Posted in reply to sivastat08

2 things, firstly are you sure you can access that path.

Secondly move to SGPLOT and GTL, far more robust:

http://documentation.sas.com/?docsetId=lrcon&docsetTarget=n0goqxbkj402cin11wm5k3mdxmb8.htm&docsetVer...

http://support.sas.com/resources/papers/proceedings11/174-2011.pdf

 

Contributor
Posts: 70

Re: how export Graph to JPEG image in sas EG

thank you sir.

Solution
‎01-31-2018 10:26 AM
Occasional Contributor
Posts: 16

Re: how export Graph to JPEG image in sas EG

Posted in reply to sivastat08
Contributor
Posts: 70

Re: how export Graph to JPEG image in sas EG

[ Edited ]
Posted in reply to prashantgupta

thank you Mr.Prashant.

Super User
Posts: 13,941

Re: how export Graph to JPEG image in sas EG

Posted in reply to sivastat08

Title of question asks about JPEG but you specifically indicate the file created is PNG???

Contributor
Posts: 70

Re: how export Graph to JPEG image in sas EG

yes sir ,i was looking for graph should be exported into either JPEG/PNG file.Going forword i will raise the question clearly.Thank you very much sir.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 470 views
  • 3 likes
  • 4 in conversation