<?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: SAS on demand: how to save figures (plots) in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757603#M65</link>
    <description>&lt;P&gt;Run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html path='/home/...../plots'(url=NONE) style=my_style image_dpi=500;
ods graphics on /attrpriority=none imagename="image01" imagefmt=png noborder;

proc sgplot data=sashelp.class;
vbar sex;
run;

ods graphics off;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then download both the .htm and the .png file to the same directory, and double-click the .htm.&lt;/P&gt;
&lt;P&gt;The URL=NONE option makes the reference in the HTML code relative; otherwise you'd have the full path in there, which (most likely) does not exist in your local computer.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jul 2021 07:28:50 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-07-28T07:28:50Z</dc:date>
    <item>
      <title>SAS on demand: how to save figures (plots)</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757596#M64</link>
      <description>&lt;P&gt;I am switching from SAS Studio to SAS On demand and I am having some trouble.&lt;/P&gt;
&lt;P&gt;In particular, when I create a plot and I want to have as an output a .png file, where and how should I save it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying with this code before the PROC SGPLOT procedure:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html path='/home/u48749812/my_data/Plots' style=my_style image_dpi=500;
ods listing gpath='/home/u48749812/my_data/Plots';
ods graphics on /attrpriority=none imagename="image01" imagefmt=png noborder;&lt;BR /&gt;&lt;BR /&gt;proc&amp;nbsp;sgplot...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In this way an empty file is saved on the SAS server (in my folder Plots), which can't be open.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And is there a way to directly save the image somewhere on my local computer, or should I always save it on the SAS server and download it manually?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 20:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757596#M64</guid>
      <dc:creator>marta25</dc:creator>
      <dc:date>2021-07-30T20:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS on demand: how to save figures (plots)</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757603#M65</link>
      <description>&lt;P&gt;Run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html path='/home/...../plots'(url=NONE) style=my_style image_dpi=500;
ods graphics on /attrpriority=none imagename="image01" imagefmt=png noborder;

proc sgplot data=sashelp.class;
vbar sex;
run;

ods graphics off;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then download both the .htm and the .png file to the same directory, and double-click the .htm.&lt;/P&gt;
&lt;P&gt;The URL=NONE option makes the reference in the HTML code relative; otherwise you'd have the full path in there, which (most likely) does not exist in your local computer.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 07:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757603#M65</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-28T07:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS on demand: how to save figures (plots)</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757681#M66</link>
      <description>&lt;P&gt;Thanks, but it still results in the same problem. If I double click on the htm file, an empty window on the browser is open. And the png file is empty.&lt;/P&gt;
&lt;P&gt;I would simply like to save my figure as a png file, it was so easy to do that before...&lt;/P&gt;
&lt;P&gt;And I do not need the htm file, is it really necessary to generate one?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 13:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757681#M66</guid>
      <dc:creator>marta25</dc:creator>
      <dc:date>2021-07-28T13:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS on demand: how to save figures (plots)</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757705#M67</link>
      <description>&lt;P&gt;First of all, you can download the png file alone to view it. The HTML is just "wrapped around" by using ODS HTML.&lt;/P&gt;
&lt;P&gt;The code I posted (very simple) created a combination which opened well on my Mac after downloading both.&lt;/P&gt;
&lt;P&gt;It is essential that you run ALL of the code (including ODS HTML CLOSE) before downloading the files.&lt;/P&gt;
&lt;P&gt;Inspect the files before and after download to see the sizes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If in any doubt, post the&amp;nbsp;&lt;EM&gt;complete&lt;/EM&gt; log of your code, starting with ODS HTML and ending with ODS HTML CLOSE.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 14:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757705#M67</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-28T14:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS on demand: how to save figures (plots)</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757709#M68</link>
      <description>&lt;P&gt;Thank you. Actually I could make it work avoiding ods html and using only ods listings and ods graphics, in this way:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing gpath ='/home/.../plots' style=styles.new_font;
ods graphics / attrpriority=none imagename="image01" imagefmt=png noborder;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In this way the png file is saved and I can open it normally...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 14:26:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-on-demand-how-to-save-figures-plots/m-p/757709#M68</guid>
      <dc:creator>marta25</dc:creator>
      <dc:date>2021-07-28T14:26:27Z</dc:date>
    </item>
  </channel>
</rss>

