<?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: Renaming graph file with imagename=&amp;quot;Myplot&amp;quot; works only with default path in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63899#M2164</link>
    <description>As a rule, PATH= and GPATH= tell ODS where you PHYSICALLY want the output. The (URL=) specifies the path to generate in the SRC= of the HTML file. Therefore, to generate your output in an image subdirectory AND have your relative image path in the SRC=, do this:&lt;BR /&gt;
&lt;BR /&gt;
ods html gpath='image' (url="images/")&lt;BR /&gt;
&lt;BR /&gt;
Let me know if that works for you.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
    <pubDate>Tue, 10 May 2011 02:01:35 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2011-05-10T02:01:35Z</dc:date>
    <item>
      <title>Renaming graph file with imagename="Myplot" works only with default path</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63898#M2163</link>
      <description>My OS is Windows Vista and I am using SAS 9.2 TS2M3. I have problems with renaming the graphs made with proc gplot when I try to redirect output to a path different than the default. The renaming does not work at all. I am only getting gplot.png, gplot1.png, gplot2.png, etc. The html document gets a proper assigned name though.&lt;BR /&gt;
&lt;BR /&gt;
Even with the default path, the following statements do not place the image in the subdirectory \image, but in the main path and I have to move them manually in order for the html document to work. I am getting src="images\Myplot.gif" in the html body document, but the image file is in the parent directory (actually my Desktop).&lt;BR /&gt;
&lt;BR /&gt;
OK, I know I can forget the  &lt;B&gt;gpath='.' (url="images/")&lt;/B&gt;   and simply use &lt;B&gt;gpath='.'&lt;/B&gt; but this is the only combination that works. &lt;BR /&gt;
 &lt;BR /&gt;
If I redirect the graphics output I get the entire path embedded in the html document, so it is not easily portable and all the graphs get default names.&lt;BR /&gt;
I really need to use my external drive for all temporary SAS files.&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions, please?&lt;BR /&gt;
&lt;BR /&gt;
P.S. I just checked the (url=none) option and it helped with no path embedded in the redirected html document, just &lt;B&gt;src="gplot8.png"&lt;/B&gt; but the images are still only gplot.png, gplot1.png etc. and reset=index does not work either here. How to get them renamed? I produce many graphs with just one run of the program. Identifying them is a real pain. This is for proc gplot output. Proc sgplot seems to work.&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Dorota_Jarosz

Message was edited by: Dorota_Jarosz</description>
      <pubDate>Mon, 09 May 2011 22:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63898#M2163</guid>
      <dc:creator>Dorota_Jarosz</dc:creator>
      <dc:date>2011-05-09T22:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming graph file with imagename="Myplot" works only with default path</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63899#M2164</link>
      <description>As a rule, PATH= and GPATH= tell ODS where you PHYSICALLY want the output. The (URL=) specifies the path to generate in the SRC= of the HTML file. Therefore, to generate your output in an image subdirectory AND have your relative image path in the SRC=, do this:&lt;BR /&gt;
&lt;BR /&gt;
ods html gpath='image' (url="images/")&lt;BR /&gt;
&lt;BR /&gt;
Let me know if that works for you.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Tue, 10 May 2011 02:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63899#M2164</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-05-10T02:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming graph file with imagename="Myplot" works only with default path</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63900#M2165</link>
      <description>Thank you so much, Dan, for responding to my post in such a timely manner. I just tested the gpath="images" (url="images/") and it works! I got a plot in subdirectory \images of the path and the html document references the image correctly: src="images/gplot.png."  So portability of html is solved. Thanks!&lt;BR /&gt;
&lt;BR /&gt;
As you can see though the renaming does not work. My &lt;B&gt;ods graphics&lt;/B&gt; statement contains &lt;B&gt;reset=index&lt;/B&gt; and &lt;B&gt;imagename="Myplot"&lt;/B&gt; but the image is named gplot the first time around I run the code, gplot1, gplot2, etc. on consecutive run, &lt;I&gt;regardless&lt;/I&gt; whether I delete the previous version or not. The html document gets replaced.&lt;BR /&gt;
&lt;BR /&gt;
So, I still have a major problem with reset=index and imagename= options.&lt;BR /&gt;
&lt;BR /&gt;
Another issue: I often would be happy without the html document altogether. Is there a way to create just a png image that I can import into my paper? When I suppress the ods html statement, I get an error that no output is open.</description>
      <pubDate>Tue, 10 May 2011 16:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63900#M2165</guid>
      <dc:creator>Dorota_Jarosz</dc:creator>
      <dc:date>2011-05-10T16:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming graph file with imagename="Myplot" works only with default path</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63901#M2166</link>
      <description>For GRSEG-based graphics like GCHART and GPLOT, the ODS GRAPHICS statement will not work for you. To override the name of the image, use the NAME= option on the procedures. To reset the index, just delete the entries from the WORK.GSEG catalog.&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps,&lt;BR /&gt;
Dan</description>
      <pubDate>Tue, 10 May 2011 20:22:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63901#M2166</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2011-05-10T20:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming graph file with imagename="Myplot" works only with default path</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63902#M2167</link>
      <description>I found the answer for renaming the graphs. For regular gplot procedure (as opposed to sgplot) I have to control the output with the goptions and filename statements - the old fashion way.&lt;BR /&gt;
&lt;B&gt;goptions  gsfname=&lt;I&gt;mypng1&lt;/I&gt;;&lt;/B&gt;&lt;BR /&gt;
where mypng1 is the file reference defined with the filename statement.&lt;BR /&gt;
&lt;B&gt;filename&lt;/B&gt; &lt;I&gt;mypng1&lt;/I&gt; "E:\MyProject\SAS_output\images\Myplot.png"; &lt;BR /&gt;
&lt;BR /&gt;
It would be REALLY helpful if the SAS 9.2 documentation mentioned or even &lt;I&gt;emphasized&lt;/I&gt; these differences. In particular that &lt;B&gt;imagename=filename&lt;/B&gt; option of the "&lt;B&gt;ods graphics on;&lt;/B&gt;" statement does not affect the output of the gplot.&lt;BR /&gt;
&lt;BR /&gt;
To stop SAS from adding consecutive numerals to subsequent graphs, use:&lt;BR /&gt;
&lt;B&gt;goptions gsfmode=replace;&lt;/B&gt;&lt;BR /&gt;
together with the &lt;B&gt;gsfname=&lt;I&gt;mypng1&lt;/I&gt;;&lt;/B&gt;.&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Dorota_Jarosz</description>
      <pubDate>Tue, 10 May 2011 20:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Renaming-graph-file-with-imagename-quot-Myplot-quot-works-only/m-p/63902#M2167</guid>
      <dc:creator>Dorota_Jarosz</dc:creator>
      <dc:date>2011-05-10T20:37:24Z</dc:date>
    </item>
  </channel>
</rss>

