<?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: In respect to SGPLOT VBAR in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465580#M16047</link>
    <description>finish updating.</description>
    <pubDate>Tue, 29 May 2018 02:48:34 GMT</pubDate>
    <dc:creator>Cingchih</dc:creator>
    <dc:date>2018-05-29T02:48:34Z</dc:date>
    <item>
      <title>In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465388#M16036</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am having issue with vbar statement of Proc SGPLOT. Here is data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A room:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; case 1 from 2018/1/1 8:00 am to&amp;nbsp;&lt;SPAN&gt;2018/1/1 9:30 am&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; case 2 from&amp;nbsp;2018/1/1 9:50 am to&amp;nbsp;&lt;SPAN&gt;2018/1/1 10:20 am&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; case 3 from&amp;nbsp;&lt;/SPAN&gt;2018/1/1 10:50 am to&amp;nbsp;&lt;SPAN&gt;2018/1/1 2:50 pm&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;B room:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;c&lt;/SPAN&gt;ase 1 from 2018/1/1 8:45 am to&amp;nbsp;&lt;SPAN&gt;2018/1/1 11:20 am&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; case 2 from&amp;nbsp;2018/1/1&lt;SPAN&gt;&amp;nbsp;11&lt;/SPAN&gt;:55&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;am to&amp;nbsp;&lt;SPAN&gt;2018/1/1&amp;nbsp;4:20&amp;nbsp;pm&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help to get the plot. Thank you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Page0002.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20798iA7C9980DA75CEEDC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Page0002.jpg" alt="Page0002.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 03:29:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465388#M16036</guid>
      <dc:creator>Cingchih</dc:creator>
      <dc:date>2018-05-28T03:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465402#M16037</link>
      <description>&lt;P&gt;You may have to use annotations.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data GRAPH;
  ROOM=1; CASE=1; TIME='01jan2018:08:00'dt; output; TIME='01jan2018:09:30'dt; output; 
  ROOM=1; CASE=2; TIME='01jan2018:09:50'dt; output; TIME='01jan2018:10:20'dt; output;
  ROOM=1; CASE=3; TIME='01jan2018:10:50'dt; output; TIME='01jan2018:14:50'dt; output;
  ROOM=2; CASE=1; TIME='01jan2018:08:45'dt; output; TIME='01jan2018:11:20'dt; output;
  ROOM=2; CASE=2; TIME='01jan2018:11:55'dt; output; TIME='01jan2018:16:20'dt; output;
  format TIME  datetime.;
run;

data ANNO;
  retain X1SPACE Y1SPACE 'datavalue' FUNCTION 'rectangle' FILLCOLOR 'lightblue' HEIGHTUNIT 'data' ANCHOR 'bottom' WIDTH 5 DISPLAY 'all';
  set GRAPH;
  by ROOM CASE;
  X1=ROOM; Y1=lag(TIME); HEIGHT=dif(TIME);
  if last.CASE;
run;

proc format ;
  value room 1='A' 2='B';
run;

proc sgplot data=GRAPH sganno=ANNO;
 scatter X=ROOM Y=TIME / markerattrs=(color=white);
 xaxis offsetmin=.25 offsetmax=.25 type=discrete ;
 refline TIME / lineattrs=(color=verylightgray);
 format ROOM room.;
run;
  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20802i8CACB6068DE5CDDE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 05:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465402#M16037</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-05-28T05:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465405#M16038</link>
      <description>&lt;P&gt;Moved post to Graph forum&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 05:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465405#M16038</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-05-28T05:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465415#M16039</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;The date range for room A is from 01Jan2018 08:00 to 01Jan2018 14:50.&lt;/P&gt;&lt;P&gt;However,&amp;nbsp;I find that it is&amp;nbsp;incorrect label on the y axis.see red region.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me. Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="圖片 008.png" style="width: 676px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20806i4FCD618E9443E195/image-dimensions/676x393?v=v2" width="676" height="393" role="button" title="圖片 008.png" alt="圖片 008.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 07:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465415#M16039</guid>
      <dc:creator>Cingchih</dc:creator>
      <dc:date>2018-05-28T07:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465417#M16040</link>
      <description>&lt;P&gt;It is not incorrect, it is rounded to the closest hour.&lt;/P&gt;
&lt;P&gt;I cant test&amp;nbsp;in the next while,&amp;nbsp;but there may be a restriction on the label length.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll look further tomorrow if you haven't found a way.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 07:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465417#M16040</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-05-28T07:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465420#M16041</link>
      <description>&lt;P&gt;We can&amp;nbsp;use&amp;nbsp;the&amp;nbsp;format (e.g., 1Jan 8:00 and &lt;SPAN&gt;1Jan&amp;nbsp;&lt;/SPAN&gt;14:50, even 8:00 and 14:50). Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 08:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465420#M16041</guid>
      <dc:creator>Cingchih</dc:creator>
      <dc:date>2018-05-28T08:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465430#M16042</link>
      <description>&lt;P&gt;You can do this by creating you own format.&lt;/P&gt;
&lt;P&gt;Sadly&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Create-the-dttime-format/idi-p/332447" target="_self"&gt;there is no dttime format.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See how to do this&amp;nbsp;&lt;A href="http://www2.sas.com/proceedings/sugi31/243-31.pdf" target="_self"&gt;here&lt;/A&gt; (from page 14) and the reference is&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473467.htm" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 08:59:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465430#M16042</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-05-28T08:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465497#M16044</link>
      <description>&lt;P&gt;I got it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sgplot data=GRAPH sganno=ANNO ;&lt;BR /&gt;scatter X=ROOM Y=TIME / markerattrs=(color=white) ;&lt;BR /&gt;xaxis offsetmin=.25 offsetmax=.25 type=discrete ;&lt;BR /&gt;yaxis interval=minute;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* increase the syntax&amp;nbsp;&amp;nbsp;*/&amp;nbsp;&amp;nbsp;&lt;BR /&gt;format ROOM room. ;&amp;nbsp;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;ref:&lt;/P&gt;&lt;P&gt;&lt;A href="http://morgan.dartmouth.edu/Docs/sas92/support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/xaxis-stmt.htm" target="_blank"&gt;http://morgan.dartmouth.edu/Docs/sas92/support.sas.com/documentation/cdl/en/grstatproc/61948/HTML/default/xaxis-stmt.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPlot26.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20815iDEEF0DB9E2EAFB97/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPlot26.png" alt="SGPlot26.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 02:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465497#M16044</guid>
      <dc:creator>Cingchih</dc:creator>
      <dc:date>2018-05-29T02:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465529#M16045</link>
      <description>&lt;P&gt;Well done!&lt;/P&gt;
&lt;P&gt;Your link is broken.&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 22:36:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465529#M16045</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-05-28T22:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: In respect to SGPLOT VBAR</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465580#M16047</link>
      <description>finish updating.</description>
      <pubDate>Tue, 29 May 2018 02:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-respect-to-SGPLOT-VBAR/m-p/465580#M16047</guid>
      <dc:creator>Cingchih</dc:creator>
      <dc:date>2018-05-29T02:48:34Z</dc:date>
    </item>
  </channel>
</rss>

