I have the attaced code which produces the desired graph:
proc sgplot data=PKALLD NOAUTOLEGEND;
title "Fit and Confidence Band from Precomputed Data";
band x=TIME lower=lcl5 upper=UCL5 / legendlabel="95% CLI" name="band1";
band x=TIME lower=LCL50 upper=UCL50 /fillattrs=GraphConfidence2
legendlabel="95% CLM" name="band2";
band x=TIME lower=LCL95 upper=UCL95 /legendlabel="95% CLM" name="band3";
SCATTER X=TIME Y=P5/ markerattrs=(symbol=Circle color=RED);
SCATTER X=TIME Y=P50/ markerattrs=(symbol=SQUAREFILLED color=RED);
SCATTER X=TIME Y=P95/ markerattrs=(symbol=ASTERISK color=RED);
xaxis label='Time (hrs)';
yaxis label='Concentration(ng/ml)';
RUN;
A portion of the data PKALLD is attached: Can someone tell me how to output the graph to a file?
TIME | p5 | P50 | P95 | LCL5 | LCL50 | LCL95 | UCL5 | UCL50 | UCL95 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0.25 | 0 | 0.26026 | 1.1053 | 0.0231 | 0.179 | 0.721 | 0.115 | 0.332 | 1.02 |
0.5 | 0.14003 | 0.9272 | 3.3223 | 0.129 | 0.878 | 2.73 | 0.603 | 1.51 | 3.85 |
1 | 0.83931 | 3.5002 | 8.8691 | 0.562 | 2.55 | 5.34 | 1.74 | 4.33 | 7.65 |
1.5 | 1.7154 | 4.75155 | 9.2648 | 1.17 | 3.57 | 6.09 | 2.37 | 5.65 | 8.95 |
There's a little gear on the top right of your posts that allow you to edit it. Or you could have kept it in the same thread rather than start the discussion all over again. And I was that person in the first place, and yes, your code and text as posted were illegible.
I will combine them back, because there was no reason to separate them.
Here's an example for PNG and PDF. I've leave the rest to you to figure out.
*specify the path to where the files should be saved;
ods listing gpath='/folders/myfolders/';
*specify the output type;
ods graphics / imagename='mygraph' imagefmt=png;
proc sgplot data=sashelp.class;
scatter x=weight y=height;
run;quit;
*Demo for creating a PDF;
ods pdf file='/folders/myfolders/demo.pdf' style=meadows;
proc sgplot data=sashelp.class;
scatter x=weight y=height;
run;quit;
ods pdf close;
Why did you start a new question?
What kind of output do you want, PDF, JPG, PNG, RTF, PPTX, XLSX?
I am using SAS UE and have been trying to find online how to write the graphical output to a file under myfolders with no success.
Can someone direct me to a post that lists the types of outputs available which can be written to a file when one uses SAS UE?
Thanks
There's a little gear on the top right of your posts that allow you to edit it. Or you could have kept it in the same thread rather than start the discussion all over again. And I was that person in the first place, and yes, your code and text as posted were illegible.
I will combine them back, because there was no reason to separate them.
Here's an example for PNG and PDF. I've leave the rest to you to figure out.
*specify the path to where the files should be saved;
ods listing gpath='/folders/myfolders/';
*specify the output type;
ods graphics / imagename='mygraph' imagefmt=png;
proc sgplot data=sashelp.class;
scatter x=weight y=height;
run;quit;
*Demo for creating a PDF;
ods pdf file='/folders/myfolders/demo.pdf' style=meadows;
proc sgplot data=sashelp.class;
scatter x=weight y=height;
run;quit;
ods pdf close;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.