<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SGPLOT output to a file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389627#M93437</link>
    <description>And this seems very different from your original question. That's not a major concern but it's helpful to state that, and if your original problem is solved.</description>
    <pubDate>Mon, 21 Aug 2017 19:13:27 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-08-21T19:13:27Z</dc:date>
    <item>
      <title>How to output graphics from SAS UE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389633#M93429</link>
      <description>&lt;P&gt;I have the attaced code which produces the desired graph:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;A portion of the data PKALLD is attached:&amp;nbsp; Can someone tell me how to output the graph to a file?&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&l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R&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0.83931&lt;/TD&gt;&lt;TD&gt;3.5002&lt;/TD&gt;&lt;TD&gt;8.8691&lt;/TD&gt;&lt;TD&gt;0.562&lt;/TD&gt;&lt;TD&gt;2.55&lt;/TD&gt;&lt;TD&gt;5.34&lt;/TD&gt;&lt;TD&gt;1.74&lt;/TD&gt;&lt;TD&gt;4.33&lt;/TD&gt;&lt;TD&gt;7.65&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1.5&lt;/TD&gt;&lt;TD&gt;1.7154&lt;/TD&gt;&lt;TD&gt;4.75155&lt;/TD&gt;&lt;TD&gt;9.2648&lt;/TD&gt;&lt;TD&gt;1.17&lt;/TD&gt;&lt;TD&gt;3.57&lt;/TD&gt;&lt;TD&gt;6.09&lt;/TD&gt;&lt;TD&gt;2.37&lt;/TD&gt;&lt;TD&gt;5.65&lt;/TD&gt;&lt;TD&gt;8.95&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 21 Aug 2017 19:42:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389633#M93429</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2017-08-21T19:42:55Z</dc:date>
    </item>
    <item>
      <title>SGPLOT output to a file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389570#M93433</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 16:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389570#M93433</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2017-08-21T16:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT output to a file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389588#M93434</link>
      <description>See the examples here:&lt;BR /&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatug/69747/HTML/default/viewer.htm#n1h5mi4oze2sc7n1wcxh7sc0onui.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatug/69747/HTML/default/viewer.htm#n1h5mi4oze2sc7n1wcxh7sc0onui.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SAS UE isn't differ AFAIK, except for the path references which are similar to using SAS on a server.</description>
      <pubDate>Mon, 21 Aug 2017 17:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389588#M93434</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-21T17:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT output to a file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389623#M93435</link>
      <description>I searched several sites and I found the following:&lt;BR /&gt;&lt;BR /&gt;Creating a graph by using the GTL involves the following steps:&lt;BR /&gt;&lt;BR /&gt;1. Define the structure of the graph by using the GTL syntax in a DEFINE&lt;BR /&gt;STATGRAPH block in a TEMPLATE procedure statement.&lt;BR /&gt;&lt;BR /&gt;2. Run the TEMPLATE procedure to compile and save the template definition.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;3. Run an SGRENDER procedure statement that specifies the template and&lt;BR /&gt;graph data set by name in order to generate the graph.&lt;BR /&gt;&lt;BR /&gt;The code that I have runs okay and gives me the desired graph but when I try&lt;BR /&gt;the code under template it fails and to me it appears that one needs to run&lt;BR /&gt;this under sgrender which I tried and it failed.&lt;BR /&gt;&lt;BR /&gt;proc sgplot data=PKALLD NOAUTOLEGEND;&lt;BR /&gt;&lt;BR /&gt;title "Fit and Confidence Band from Precomputed Data";&lt;BR /&gt;&lt;BR /&gt;band x=TIME lower=lcl5 upper=UCL5 / legendlabel="95% CLI" name="band1";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;band x=TIME lower=LCL50 upper=UCL50 /fillattrs=GraphConfidence2&lt;BR /&gt;&lt;BR /&gt;legendlabel="95% CLM" name="band2";&lt;BR /&gt;&lt;BR /&gt;band x=TIME lower=LCL95 upper=UCL95 /legendlabel="95% CLM"&lt;BR /&gt;name="band3";&lt;BR /&gt;&lt;BR /&gt;SCATTER X=TIME Y=P5/ markerattrs=(symbol=Circle color=RED);&lt;BR /&gt;&lt;BR /&gt;SCATTER X=TIME Y=P50/ markerattrs=(symbol=SQUAREFILLED color=RED);&lt;BR /&gt;&lt;BR /&gt;SCATTER X=TIME Y=P95/ markerattrs=(symbol=ASTERISK color=RED);&lt;BR /&gt;&lt;BR /&gt;xaxis label='Time (hrs)';&lt;BR /&gt;&lt;BR /&gt;yaxis label='Concentration(ng/ml)';&lt;BR /&gt;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;Can you tell me what I have done wrong which causes my code to fail under&lt;BR /&gt;template since I get errors stating that my axis statements are not valid or&lt;BR /&gt;out of proper order?&lt;BR /&gt;&lt;BR /&gt;proc template;&lt;BR /&gt;&lt;BR /&gt;define statgraph newfit;&lt;BR /&gt;&lt;BR /&gt;begingraph;&lt;BR /&gt;&lt;BR /&gt;entrytitle "Model Qualification plot";&lt;BR /&gt;&lt;BR /&gt;layout overlay;&lt;BR /&gt;&lt;BR /&gt;band x=TIME lower=lcl5 upper=UCL5 /&lt;BR /&gt;&lt;BR /&gt;legendlabel="95% CLI" name="band1";&lt;BR /&gt;&lt;BR /&gt;band x=TIME lower=LCL50 upper=UCL50 /fillattrs=GraphConfidence2&lt;BR /&gt;&lt;BR /&gt;legendlabel="95% CLM" name="band2";&lt;BR /&gt;&lt;BR /&gt;band x=TIME lower=LCL95 upper=UCL95 /&lt;BR /&gt;&lt;BR /&gt;legendlabel="95% CLM" name="band3";&lt;BR /&gt;&lt;BR /&gt;SCATTER X=TIME Y=P5/ markerattrs=(symbol=Circle color=RED);&lt;BR /&gt;&lt;BR /&gt;SCATTER X=TIME Y=P50/ markerattrs=(symbol=SQUAREFILLED color=RED);&lt;BR /&gt;&lt;BR /&gt;SCATTER X=TIME Y=P95/ markerattrs=(symbol=ASTERISK color=RED);&lt;BR /&gt;&lt;BR /&gt;xaxis label='Time (hrs)';&lt;BR /&gt;&lt;BR /&gt;yaxis label='Concentration(ng/ml)';&lt;BR /&gt;&lt;BR /&gt;endlayout;&lt;BR /&gt;&lt;BR /&gt;endgraph;&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;This is a small section of my data:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TIME&lt;BR /&gt;&lt;BR /&gt;P5&lt;BR /&gt;&lt;BR /&gt;P50&lt;BR /&gt;&lt;BR /&gt;P95&lt;BR /&gt;&lt;BR /&gt;LCL5&lt;BR /&gt;&lt;BR /&gt;LCL50&lt;BR /&gt;&lt;BR /&gt;LCL95&lt;BR /&gt;&lt;BR /&gt;UCL5&lt;BR /&gt;&lt;BR /&gt;UCL50&lt;BR /&gt;&lt;BR /&gt;UCL95&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;0.25&lt;BR /&gt;&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;0.26026&lt;BR /&gt;&lt;BR /&gt;1.1053&lt;BR /&gt;&lt;BR /&gt;0.0231&lt;BR /&gt;&lt;BR /&gt;0.179&lt;BR /&gt;&lt;BR /&gt;0.721&lt;BR /&gt;&lt;BR /&gt;0.115&lt;BR /&gt;&lt;BR /&gt;0.332&lt;BR /&gt;&lt;BR /&gt;1.02&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;0.5&lt;BR /&gt;&lt;BR /&gt;0.14003&lt;BR /&gt;&lt;BR /&gt;0.9272&lt;BR /&gt;&lt;BR /&gt;3.3223&lt;BR /&gt;&lt;BR /&gt;0.129&lt;BR /&gt;&lt;BR /&gt;0.878&lt;BR /&gt;&lt;BR /&gt;2.73&lt;BR /&gt;&lt;BR /&gt;0.603&lt;BR /&gt;&lt;BR /&gt;1.51&lt;BR /&gt;&lt;BR /&gt;3.85&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;1&lt;BR /&gt;&lt;BR /&gt;0.83931&lt;BR /&gt;&lt;BR /&gt;3.5002&lt;BR /&gt;&lt;BR /&gt;8.8691&lt;BR /&gt;&lt;BR /&gt;0.562&lt;BR /&gt;&lt;BR /&gt;2.55&lt;BR /&gt;&lt;BR /&gt;5.34&lt;BR /&gt;&lt;BR /&gt;1.74&lt;BR /&gt;&lt;BR /&gt;4.33&lt;BR /&gt;&lt;BR /&gt;7.65&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;1.5&lt;BR /&gt;&lt;BR /&gt;1.7154&lt;BR /&gt;&lt;BR /&gt;4.75155&lt;BR /&gt;&lt;BR /&gt;9.2648&lt;BR /&gt;&lt;BR /&gt;1.17&lt;BR /&gt;&lt;BR /&gt;3.57&lt;BR /&gt;&lt;BR /&gt;6.09&lt;BR /&gt;&lt;BR /&gt;2.37&lt;BR /&gt;&lt;BR /&gt;5.65&lt;BR /&gt;&lt;BR /&gt;8.95&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Aug 2017 19:08:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389623#M93435</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2017-08-21T19:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT output to a file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389625#M93436</link>
      <description>Format this so it's legible please. Use the insert code to insert code and use a data step so we can just run your code and get your data. You also haven't included your SGRENDER proc. If it's easier use the SASHELP datasets as your example data since everyone has access to those.&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Aug 2017 19:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389625#M93436</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-21T19:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT output to a file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389627#M93437</link>
      <description>And this seems very different from your original question. That's not a major concern but it's helpful to state that, and if your original problem is solved.</description>
      <pubDate>Mon, 21 Aug 2017 19:13:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389627#M93437</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-21T19:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT output to a file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389630#M93438</link>
      <description>I still have the original question but I was merely trying to show what I&lt;BR /&gt;had resulted based upon the suggestion at this site&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;wer.htm#n1h5mi4oze2sc7n1wcxh7sc0onui.htm&amp;gt;&lt;BR /&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatug/69747/HTML/default/view" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatug/69747/HTML/default/view&lt;/A&gt;&lt;BR /&gt;er.htm#n1h5mi4oze2sc7n1wcxh7sc0onui.htm&lt;BR /&gt;&lt;BR /&gt;I will repost the code and data as suggested.&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Aug 2017 19:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389630#M93438</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2017-08-21T19:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to output graphics from SAS UE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389636#M93430</link>
      <description>&lt;P&gt;Why did you start a new question?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What kind of output do you want, PDF, JPG, PNG, RTF, PPTX, XLSX?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 19:47:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389636#M93430</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-21T19:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to output graphics from SAS UE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389639#M93431</link>
      <description>I started a new output since someone stated that they could not read my code&lt;BR /&gt;in a previous E-mail.&lt;BR /&gt;&lt;BR /&gt;I would like the choice of pdf, jpg, or png.&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Aug 2017 19:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389639#M93431</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2017-08-21T19:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to output graphics from SAS UE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389640#M93432</link>
      <description>&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will combine them back, because there was no reason to separate them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example for PNG and PDF. I've leave the rest to you to figure out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*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;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 19:56:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-output-graphics-from-SAS-UE/m-p/389640#M93432</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-21T19:56:04Z</dc:date>
    </item>
  </channel>
</rss>

