<?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: Proc sgplot/Tickvalueformat problem in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551518#M22635</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15125"&gt;@BigD&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The picture format works as it should for proc print, but not in the sgplot procedures. Results are:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled picture1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28732i561EF5A5099889E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled picture1.png" alt="Untitled picture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;getting the literal '%f'.&amp;nbsp; Am I doing something wrong?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show your Proc Format and Sgplot code.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Apr 2019 19:16:18 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-04-16T19:16:18Z</dc:date>
    <item>
      <title>Proc sgplot/Tickvalueformat problem</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551465#M22632</link>
      <description>&lt;P&gt;I am running a sgpanel graph procedure like this:&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;proc sgpanel data=m_test_1;
panelby&amp;nbsp; Storesl/columns=1 UNISCALE= column onepanel;
series y= avg x=N_date1 ;
colaxis integer interval =day TICKVALUEFORMAT=WEEKDAY3. ;
rowaxis integer ;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The n_date1 variable is a date-time that has values of the for each weekday at each hour. The graph will only plot the date (see below) but I would like the weekday (Sun, Mon, etc.)&amp;nbsp; only to be displayed.&amp;nbsp; I've played with the tickvalueformat but it doesn't help, nor has a simple format statement.&amp;nbsp; Same problems with a regular sgplot.&amp;nbsp; Any ideas?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sample graph.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28723i9A798AB82D98855B/image-size/large?v=v2&amp;amp;px=999" role="button" title="sample graph.png" alt="sample graph.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 17:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551465#M22632</guid>
      <dc:creator>BigD</dc:creator>
      <dc:date>2019-04-16T17:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot/Tickvalueformat problem</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551473#M22633</link>
      <description>&lt;P&gt;WEEKDAY format takes a DATE value for display. You say that "n_date1 variable is a date-time". So you are using an incorrect format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likely the approach to get what you might want is to build a custom format using proc format .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format library=work;
picture dtwkdayname
low - high ='%F' (datatype=datetime)
;
run;

data example;
   x='01JAN2019:12:20:00'dt;
   put x dtwkdayname3.;
run;

&lt;/PRE&gt;
&lt;P&gt;Use the length 3 to show a 3-letter day of the week.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 17:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551473#M22633</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-16T17:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot/Tickvalueformat problem</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551505#M22634</link>
      <description>&lt;P&gt;The picture format works as it should for proc print, but not in the sgplot procedures. Results are:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled picture1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28732i561EF5A5099889E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled picture1.png" alt="Untitled picture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;getting the literal '%f'.&amp;nbsp; Am I doing something wrong?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 18:39:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551505#M22634</guid>
      <dc:creator>BigD</dc:creator>
      <dc:date>2019-04-16T18:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot/Tickvalueformat problem</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551518#M22635</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15125"&gt;@BigD&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The picture format works as it should for proc print, but not in the sgplot procedures. Results are:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled picture1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28732i561EF5A5099889E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled picture1.png" alt="Untitled picture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;getting the literal '%f'.&amp;nbsp; Am I doing something wrong?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Show your Proc Format and Sgplot code.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 19:16:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551518#M22635</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-16T19:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot/Tickvalueformat problem</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551527#M22636</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc format library=work;
picture dtwkdayname
low - high ='%f' (datatype=datetime)
;
run;
ods graphics /reset height = 18in width = 11in;
ods html;
proc sgpanel  data=m_test_1;
panelby store /columns=1 UNISCALE=  column onepanel;
series y= avg   x=N_date1 ;
colaxis integer  TICKVALUEFORMAT=dtwkdayname3. ;
/*rowaxis integer ;*/
run;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I've also run it without the colaxis and use a format n_date_1&amp;nbsp; dtwkdayname3. with the same results: '%f' as the label&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled picture2.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28735iD9B3538B77E35520/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled picture2.png" alt="Untitled picture2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 19:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551527#M22636</guid>
      <dc:creator>BigD</dc:creator>
      <dc:date>2019-04-16T19:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot/Tickvalueformat problem</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551581#M22637</link>
      <description>&lt;P&gt;The problem with the custom format is that the SG procedures currently do no support the custom user date, time or datetime formats.&lt;/P&gt;
&lt;P&gt;So that approach won't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is one way to make date value with time bits turned into fractions of a day and may work.&lt;/P&gt;
&lt;P&gt;Note that a wide range of dates may be misleading.&lt;/P&gt;
&lt;PRE&gt;data junk;
   dt = '02JAN2019:12:30:00'dt;
   do i= 1 to 10;
      time= timepart(intnx('dtday',dt,i,'S'))/(24*60*60);
      plotdate= datepart(intnx('dtday',dt,i,'S')) + time;
      output;
   end;
run;
proc sgplot  data=junk;
series y= i   x=plotdate;
xaxis valuesformat=downame3.;
run;
&lt;/PRE&gt;
&lt;P&gt;The Format for the X variable won't work but the values format on the xaxis works for this example. Without your data no promises.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 22:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551581#M22637</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-16T22:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot/Tickvalueformat problem</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551596#M22638</link>
      <description>&lt;P&gt;This works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data timedata;
set sashelp.timedata;
/* Fake stocks */
do stock = "A", "B"; output; end;
run;

ods graphics / width=600 height=600;
proc sgpanel data=timedata;
where datepart(datetime) between "01jan2000"d and "14jan2000"d;
panelby stock / columns=1 onepanel;
series x=datetime y=volume;
colaxis type=time interval=day tickvalueformat=dtwkdatx3.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPanel4.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/28738i4ED585342EFCD49E/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPanel4.png" alt="SGPanel4.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 03:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551596#M22638</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-04-17T03:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgplot/Tickvalueformat problem</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551743#M22645</link>
      <description>&lt;P&gt;A very subtle difference: I had colaxis type = integer instead of&amp;nbsp;colaxis type = time.&amp;nbsp; Works fine now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had originally tried the integer option a while ago to "force" non -decimal dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruce&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 14:14:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-sgplot-Tickvalueformat-problem/m-p/551743#M22645</guid>
      <dc:creator>BigD</dc:creator>
      <dc:date>2019-04-17T14:14:07Z</dc:date>
    </item>
  </channel>
</rss>

