<?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: Picture Formats Not Rendered in PROC SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/231451#M8395</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54﻿&lt;/a&gt;, Function-formats (fcmp) don't work with sg procs either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

proc fcmp outlib=work.fcmp.fmt;
   function weekfmt(date) $2;
      return(put(week(date),z2.0));
   endsub;
run;

options cmplib=(work.fcmp);

proc format; 
   value weekfmt 
         other=[weekfmt()]; 
run;

/* Doesn't work */
proc sgplot data=sashelp.Citiday;
format date weekfmt.;
series x=date y=SNYDJCM;
run;

/* But this works */
proc print data=sashelp.citiday(obs=20); 
format date weekfmt.; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 23 Oct 2015 20:44:47 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2015-10-23T20:44:47Z</dc:date>
    <item>
      <title>Picture Formats Not Rendered in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/230873#M8358</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Should I be able to use a picture format in SGPLOT?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a picture format using a date directive for the week number ('%W').&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I generate a scatter plot using PROC SGPLOT, the x-axis tick labels are rendered as %W instead of 01, 02, 03, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if I use my picture format with PROC GPLOT, the x-axis tick labels are displayed correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(I'm familiar with the weekw3. format, but I don't want the extra 'W' in front of every value in my x-axis -- W01, W02, W03, etc.&amp;nbsp; And I need to use some specific features of SGPLOT rather than reverting to GPLOT.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found a few other posts on this topic, but the suggested workaround is to convert the x-axis variable to a formatted character value.&amp;nbsp; I don't think my irregularly-spaced time series data will be plotted correctly if I convert all the dates to formatted characted values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Proc-GChart-does-not-render-a-user-defined-PICTURE-format/m-p/142396/highlight/true#M5380" target="_blank"&gt;Related Post #1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;* &lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/SGPLOT-VBAR-and-a-user-defined-format-on-the-category-variable/m-p/125721/highlight/true#M4864" target="_blank"&gt;Related Post #2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Does anyone have any insights about using picture formats in PROC SGPLOT?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance...&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 06:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/230873#M8358</guid>
      <dc:creator>bbrooke</dc:creator>
      <dc:date>2015-10-21T06:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Picture Formats Not Rendered in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/230877#M8360</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know if it's a proper solution, but you always could extrat your TPL code from the SGPLOT (option&amp;nbsp;TMPLOUT) and edit the layout XAXISOPTS with something like that if you know the number of weeks.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Layout overlay / XAXISOPTS= (LINEAROPTS=(tickvaluelist=(1 2 3) 
                         tickdisplaylist=('01' '02' '03')))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 08:08:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/230877#M8360</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2015-10-21T08:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Picture Formats Not Rendered in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/230916#M8365</link>
      <description>&lt;P&gt;Please see this post on same topic.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/SGPLOT-VBAR-and-a-user-defined-format-on-the-category-variable/m-p/125721/highlight/true#M4864" target="_blank"&gt;https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/SGPLOT-VBAR-and-a-user-defined-format-on-the-category-variable/m-p/125721/highlight/true#M4864&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 12:52:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/230916#M8365</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-10-21T12:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Picture Formats Not Rendered in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/231451#M8395</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54﻿&lt;/a&gt;, Function-formats (fcmp) don't work with sg procs either.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

proc fcmp outlib=work.fcmp.fmt;
   function weekfmt(date) $2;
      return(put(week(date),z2.0));
   endsub;
run;

options cmplib=(work.fcmp);

proc format; 
   value weekfmt 
         other=[weekfmt()]; 
run;

/* Doesn't work */
proc sgplot data=sashelp.Citiday;
format date weekfmt.;
series x=date y=SNYDJCM;
run;

/* But this works */
proc print data=sashelp.citiday(obs=20); 
format date weekfmt.; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Oct 2015 20:44:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/231451#M8395</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-10-23T20:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Picture Formats Not Rendered in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/231455#M8396</link>
      <description>&lt;P&gt;You could get away with something like this, I guess&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data myGraph;
set sashelp.Citiday;
/* Weeks starting on a Sunday */
myDate = intck("DAY", "27DEC1987"d, date) / 7; 
format mydate z3.0;
run;

proc sgplot data=myGraph;
series x=mydate y=SNYDJCM;
xaxis integer label="Week Number";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Oct 2015 21:02:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Picture-Formats-Not-Rendered-in-PROC-SGPLOT/m-p/231455#M8396</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-10-23T21:02:39Z</dc:date>
    </item>
  </channel>
</rss>

