<?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 gplot Annotate BAR function with character coordinate in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680836#M20443</link>
    <description>&lt;P&gt;Thank you very much. I sincerely appreciate the feedback.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, bar does not have the 'R2' &amp;nbsp;pattern applied. The anno file has the 'R2' in style, but it is not applied.&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="screenshot_130.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48855i3A8E6667DC490B1C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="screenshot_130.png" alt="screenshot_130.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 01 Sep 2020 23:15:52 GMT</pubDate>
    <dc:creator>SSTEAD</dc:creator>
    <dc:date>2020-09-01T23:15:52Z</dc:date>
    <item>
      <title>proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680561#M20437</link>
      <description>&lt;P&gt;I am trying to use annotate to make a graph of booked rooms. I orginally used function='line' , but I wanted to include shading styles. When I use function='bar' the style is ignored. I get the same result with function='line'. What am I missing here? Here is the code example.&lt;/P&gt;
&lt;P&gt;Thank you for taking a look at this.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; source;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;length&lt;/SPAN&gt; color text &lt;SPAN class="s3"&gt;$8.&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P class="p1"&gt;location = &lt;SPAN class="s4"&gt;'Rm-01'&lt;/SPAN&gt;; starttime=&lt;SPAN class="s3"&gt;&lt;STRONG&gt;'08:00't&lt;/STRONG&gt;&lt;/SPAN&gt;; endtime=&lt;SPAN class="s3"&gt;&lt;STRONG&gt;'15:30't&lt;/STRONG&gt;&lt;/SPAN&gt;; color = &lt;SPAN class="s4"&gt;'red'&lt;/SPAN&gt;; text= &lt;SPAN class="s4"&gt;'red'&lt;/SPAN&gt;; &lt;SPAN class="s2"&gt;output&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p1"&gt;location = &lt;SPAN class="s4"&gt;'Rm-02'&lt;/SPAN&gt;; starttime=&lt;SPAN class="s3"&gt;&lt;STRONG&gt;'08:30't&lt;/STRONG&gt;&lt;/SPAN&gt;; endtime=&lt;SPAN class="s3"&gt;&lt;STRONG&gt;'16:00't&lt;/STRONG&gt;&lt;/SPAN&gt;; color = &lt;SPAN class="s4"&gt;'white'&lt;/SPAN&gt;; text= &lt;SPAN class="s4"&gt;'white'&lt;/SPAN&gt;; &lt;SPAN class="s2"&gt;output&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p1"&gt;location = &lt;SPAN class="s4"&gt;'Rm-03'&lt;/SPAN&gt;; starttime=&lt;SPAN class="s3"&gt;&lt;STRONG&gt;'08:15't&lt;/STRONG&gt;&lt;/SPAN&gt;; endtime=&lt;SPAN class="s3"&gt;&lt;STRONG&gt;'15:15't&lt;/STRONG&gt;&lt;/SPAN&gt;; color = &lt;SPAN class="s4"&gt;'blue'&lt;/SPAN&gt;; text= &lt;SPAN class="s4"&gt;'blue'&lt;/SPAN&gt;;&lt;SPAN class="s2"&gt;output&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s5"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;%let&lt;/SPAN&gt; SZ=44;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; anno;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;length&lt;/SPAN&gt; style &lt;SPAN class="s3"&gt;$5.&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;length&lt;/SPAN&gt; function &lt;SPAN class="s3"&gt;$12.&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;retain&lt;/SPAN&gt; xsys ysys &lt;SPAN class="s4"&gt;'2'&lt;/SPAN&gt; size &amp;amp;SZ color &lt;SPAN class="s4"&gt;'orange'&lt;/SPAN&gt; BlkHldrLabel &lt;SPAN class="s4"&gt;' '&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;set&lt;/SPAN&gt; source ;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;ine=&lt;SPAN class="s3"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p1"&gt;style =&lt;SPAN class="s4"&gt;'solid'&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;if&lt;/SPAN&gt; color = &lt;SPAN class="s4"&gt;'white'&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;then&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;do&lt;/SPAN&gt;; style=&lt;SPAN class="s4"&gt;'R2'&lt;/SPAN&gt;; color=&lt;SPAN class="s4"&gt;'light grey'&lt;/SPAN&gt;; &lt;SPAN class="s2"&gt;end&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;function=&lt;SPAN class="s4"&gt;'move'&lt;/SPAN&gt; ; x=StartTime ;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;yc=location ; &lt;SPAN class="s2"&gt;output&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;function=&lt;SPAN class="s4"&gt;'bar'&lt;/SPAN&gt; ; size=&amp;amp;SZ ; x=EndTime ; yc=location ; &lt;SPAN class="s2"&gt;output&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;function=&lt;SPAN class="s4"&gt;'label'&lt;/SPAN&gt; ; color=&lt;SPAN class="s4"&gt;'white'&lt;/SPAN&gt;; size=&lt;SPAN class="s3"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt; ; style=&lt;SPAN class="s4"&gt;'Arial'&lt;/SPAN&gt;;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;position =&lt;SPAN class="s4"&gt;'6'&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P class="p1"&gt;x=StartTime ; yc=location; &lt;SPAN class="s2"&gt;output&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s5"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p4"&gt;/* Set Symbols and Axes */&lt;/P&gt;
&lt;P class="p5"&gt;symbol1 i&lt;SPAN class="s5"&gt;=&lt;/SPAN&gt;none&lt;SPAN class="s5"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p5"&gt;axis1 label&lt;SPAN class="s5"&gt;=&lt;/SPAN&gt;none&lt;SPAN class="s5"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p5"&gt;axis2 order&lt;SPAN class="s5"&gt;=(&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;21600&lt;/STRONG&gt;&lt;/SPAN&gt; to &lt;SPAN class="s3"&gt;&lt;STRONG&gt;72000&lt;/STRONG&gt;&lt;/SPAN&gt; by &lt;SPAN class="s3"&gt;&lt;STRONG&gt;3600&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;) &lt;/SPAN&gt;minor&lt;SPAN class="s5"&gt;=&lt;/SPAN&gt;none&lt;/P&gt;
&lt;P class="p6"&gt;&lt;SPAN class="s2"&gt;label&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;=(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;h&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;1.5&lt;/STRONG&gt;&lt;/SPAN&gt; "Time of Day"&lt;SPAN class="s5"&gt;) &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Value&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;=(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;h&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p4"&gt;/* Plot the Timeline */&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;gplot&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;annotate&lt;/SPAN&gt;=anno ;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;plot&lt;/SPAN&gt; location*EndTime/&lt;SPAN class="s2"&gt;vaxis&lt;/SPAN&gt;=axis1 &lt;SPAN class="s2"&gt;haxis&lt;/SPAN&gt;=axis2 &lt;SPAN class="s2"&gt;VREVERSE&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p7"&gt;&lt;SPAN class="s2"&gt;href&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;= &lt;/SPAN&gt;&lt;STRONG&gt;21600&lt;/STRONG&gt; &lt;STRONG&gt;25200&lt;/STRONG&gt; &lt;STRONG&gt;28800&lt;/STRONG&gt; &lt;STRONG&gt;32400&lt;/STRONG&gt; &lt;STRONG&gt;36000&lt;/STRONG&gt; &lt;STRONG&gt;39600&lt;/STRONG&gt; &lt;STRONG&gt;43200&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p7"&gt;&lt;SPAN class="s5"&gt; &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;50400&lt;/STRONG&gt; &lt;STRONG&gt;54000&lt;/STRONG&gt; &lt;STRONG&gt;57600&lt;/STRONG&gt; &lt;STRONG&gt;61200&lt;/STRONG&gt; &lt;STRONG&gt;64800&lt;/STRONG&gt; &lt;STRONG&gt;68400&lt;/STRONG&gt; &lt;STRONG&gt;72000&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p5"&gt;lhref&lt;SPAN class="s5"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s5"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;format&lt;/SPAN&gt; EndTime &lt;SPAN class="s3"&gt;time5.&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s5"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 21:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680561#M20437</guid>
      <dc:creator>SSTEAD</dc:creator>
      <dc:date>2020-08-31T21:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680821#M20439</link>
      <description>&lt;P&gt;Is "ine" supposed to be "line"? Maybe some values get truncated in the annotate data set, which should look something like this:&lt;BR /&gt;OBS FUNCTION X Y HSYS XSYS YSYS STYLE COLOR POSITION SIZE LINE TEXT&lt;BR /&gt;&lt;BR /&gt;1 label 20 85 3 3 3 swissb green 6 6.0 . Sample Annotate Graphics&lt;BR /&gt;2 move 28 30 3 3 3 swissb green 6 6.0 . Sample Annotate Graphics&lt;BR /&gt;3 draw 68 30 3 3 3 swissb red 6 0.8 1 Sample Annotate Graphics&lt;BR /&gt;4 draw 48 70 3 3 3 swissb red 6 0.8 1 Sample Annotate Graphics&lt;BR /&gt;5 draw 28 30 3 3 3 swissb red 6 0.8 1 Sample Annotate Graphics&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 21:08:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680821#M20439</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2020-09-01T21:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680827#M20440</link>
      <description>&lt;P&gt;First your COLOR variable has different length settings, so "light gray" is truncated to "light".&lt;/P&gt;
&lt;P&gt;Second IIRC correctly you may need to specify &lt;STRONG&gt;which form of Arial&lt;/STRONG&gt; that you want to use. Likely your system has fonts like 'Arial Regular' 'Arial Black' 'Arial Bold' 'Arial Bold Italic' and 'Arial Italic'. It has been a long time since I did any annotate for Proc Gplot but I seem to remember several fonts, Arial among them, that needs the full name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have modified your program by making the length of the Color and Style variable longer and used 'Arial Black', a very bold version, to show that the font style is applied, changed "ine" to "line", and reformatted the code a bit. You may need to check your system for the actual spelling of the font a bit more carefully.&lt;/P&gt;
&lt;PRE&gt;data source;
   length color text $15. ;
   location = 'Rm-01'; starttime='08:00't; endtime='15:30't; color = 'red'; text= 'red'; output;
   location = 'Rm-02'; starttime='08:30't; endtime='16:00't; color = 'white'; text= 'white'; output;
   location = 'Rm-03'; starttime='08:15't; endtime='15:15't; color = 'blue'; text= 'blue';output;
run;
 
%let SZ=44;
data anno;
   length style $15. color $15.;
   length function $12. ;
   retain xsys ysys '2' size &amp;amp;SZ color 'orange' 
          BlkHldrLabel ' '
   ;
   set source ;
    
   line=1;
   style ='solid';
   if color = 'white' then do; style='R2'; color='light grey'; end;
    
   function='move' ; x=StartTime ;  yc=location ; output ;
    
   function='bar' ; size=&amp;amp;SZ ; x=EndTime ; yc=location ; output ;
    
   function='label' ; color='white'; size=3 ; style='Arial Black';  position ='6' ;
   x=StartTime ; yc=location; output;
 
run;
 
/* Set Symbols and Axes */
symbol1 i=none;
axis1 label=none;
axis2 order=(21600 to 72000 by 3600) minor=none
label=(h=1.5 "Time of Day") Value=(h=1);
 
/* Plot the Timeline */
proc gplot annotate=anno ;
   plot location*EndTime/vaxis=axis1 haxis=axis2 VREVERSE
   href= 21600 25200 28800 32400 36000 39600 43200
     50400 54000 57600 61200 64800 68400 72000
   lhref=4;
   format EndTime time5.;
run;
quit;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 22:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680827#M20440</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-01T22:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680829#M20441</link>
      <description>&lt;P&gt;You have a sharp eye. I messed up the cut and paste. Unfortunately, I could not see how to edit a post when I realized that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a more simplified example, with %annomac and %hbar macros, the internal files and outputs:&lt;/P&gt;
&lt;P&gt;As you can see the anno dataset looks correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It appears that with character coodinates, you cannot do fills.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; source;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;length&lt;/SPAN&gt; barcolor text &lt;SPAN&gt;$8.&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P&gt;location = &lt;SPAN&gt;'Rm-01'&lt;/SPAN&gt;; starttime=&lt;SPAN&gt;&lt;STRONG&gt;'08:00't&lt;/STRONG&gt;&lt;/SPAN&gt;; endtime=&lt;SPAN&gt;&lt;STRONG&gt;'15:30't&lt;/STRONG&gt;&lt;/SPAN&gt;; barcolor = &lt;SPAN&gt;'red'&lt;/SPAN&gt;; text= &lt;SPAN&gt;'red'&lt;/SPAN&gt;; &lt;SPAN&gt;output&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P&gt;location = &lt;SPAN&gt;'Rm-02'&lt;/SPAN&gt;; starttime=&lt;SPAN&gt;&lt;STRONG&gt;'08:30't&lt;/STRONG&gt;&lt;/SPAN&gt;; endtime=&lt;SPAN&gt;&lt;STRONG&gt;'16:00't&lt;/STRONG&gt;&lt;/SPAN&gt;; barcolor = &lt;SPAN&gt;'white'&lt;/SPAN&gt;; text= &lt;SPAN&gt;'white'&lt;/SPAN&gt;; &lt;SPAN&gt;output&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P&gt;location = &lt;SPAN&gt;'Rm-03'&lt;/SPAN&gt;; starttime=&lt;SPAN&gt;&lt;STRONG&gt;'08:15't&lt;/STRONG&gt;&lt;/SPAN&gt;; endtime=&lt;SPAN&gt;&lt;STRONG&gt;'15:15't&lt;/STRONG&gt;&lt;/SPAN&gt;; barcolor = &lt;SPAN&gt;'blue'&lt;/SPAN&gt;; text= &lt;SPAN&gt;'blue'&lt;/SPAN&gt;;&lt;SPAN&gt;output&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;options symbolgen&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%let&lt;/SPAN&gt; SZ=44;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;annomac&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; anno (&lt;SPAN&gt;rename&lt;/SPAN&gt;=(y=yc));&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;length&lt;/SPAN&gt; style &lt;SPAN&gt;$5.&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;length&lt;/SPAN&gt; function &lt;SPAN&gt;$12.&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;retain&lt;/SPAN&gt; xsys ysys &lt;SPAN&gt;'2'&lt;/SPAN&gt; size &amp;amp;SZ ;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;set&lt;/SPAN&gt; source ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;put&lt;/SPAN&gt; location= starttime= endtime= barcolor= text= ;&lt;/P&gt;
&lt;P&gt;line=&lt;SPAN&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;; style =&lt;SPAN&gt;'Empty'&lt;/SPAN&gt;; color=barcolor;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;BAR2&lt;/I&gt;&lt;/STRONG&gt;(starttime, location, endtime, location, *, line, R5, &amp;amp;SZ);&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Set Symbols and Axes */&lt;/P&gt;
&lt;P&gt;symbol1 i&lt;SPAN&gt;=&lt;/SPAN&gt;none&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;axis1 label&lt;SPAN&gt;=&lt;/SPAN&gt;none&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;axis2 order&lt;SPAN&gt;=(&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;21600&lt;/STRONG&gt;&lt;/SPAN&gt; to &lt;SPAN&gt;&lt;STRONG&gt;72000&lt;/STRONG&gt;&lt;/SPAN&gt; by &lt;SPAN&gt;&lt;STRONG&gt;3600&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;minor&lt;SPAN&gt;=&lt;/SPAN&gt;none&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;label&lt;/SPAN&gt;&lt;SPAN&gt;=(&lt;/SPAN&gt;&lt;SPAN&gt;h&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;1.5&lt;/STRONG&gt;&lt;/SPAN&gt; "Time of Day"&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;Value&lt;/SPAN&gt;&lt;SPAN&gt;=(&lt;/SPAN&gt;&lt;SPAN&gt;h&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Plot the Timeline */&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;gplot&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;annotate&lt;/SPAN&gt;=anno ;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;plot&lt;/SPAN&gt; location*EndTime/&lt;SPAN&gt;vaxis&lt;/SPAN&gt;=axis1 &lt;SPAN&gt;haxis&lt;/SPAN&gt;=axis2 &lt;SPAN&gt;VREVERSE&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;href&lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;STRONG&gt;21600&lt;/STRONG&gt; &lt;STRONG&gt;25200&lt;/STRONG&gt; &lt;STRONG&gt;28800&lt;/STRONG&gt; &lt;STRONG&gt;32400&lt;/STRONG&gt; &lt;STRONG&gt;36000&lt;/STRONG&gt; &lt;STRONG&gt;39600&lt;/STRONG&gt; &lt;STRONG&gt;43200&lt;/STRONG&gt; &lt;STRONG&gt;46800&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;50400&lt;/STRONG&gt; &lt;STRONG&gt;54000&lt;/STRONG&gt; &lt;STRONG&gt;57600&lt;/STRONG&gt; &lt;STRONG&gt;61200&lt;/STRONG&gt; &lt;STRONG&gt;64800&lt;/STRONG&gt; &lt;STRONG&gt;68400&lt;/STRONG&gt; &lt;STRONG&gt;72000&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;lhref&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;format&lt;/SPAN&gt; EndTime &lt;SPAN&gt;time5.&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;**** Here is&amp;nbsp;source:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;barcolor text location starttime endtime&lt;/DIV&gt;
&lt;DIV&gt;red red Rm-01 28800 15:30&lt;/DIV&gt;
&lt;DIV&gt;white white Rm-02 30600 16:00&lt;/DIV&gt;
&lt;DIV&gt;blue blue Rm-03 29700 15:15&lt;/DIV&gt;
&lt;P&gt;**** Here is anno ****&lt;/P&gt;
&lt;DIV&gt;style function xsys ysys size barcolor text location starttime endtime line color X yc&lt;/DIV&gt;
&lt;DIV&gt;Empty MOVE 2 2 44 red red Rm-01 28800 55800 0 red 28800 Rm-01&lt;/DIV&gt;
&lt;DIV&gt;R5 BAR 2 2 44 red red Rm-01 28800 55800 0 red 55800 Rm-01&lt;/DIV&gt;
&lt;DIV&gt;Empty MOVE 2 2 44 white white Rm-02 30600 57600 0 white 30600 Rm-02&lt;/DIV&gt;
&lt;DIV&gt;R5 BAR 2 2 44 white white Rm-02 30600 57600 0 white 57600 Rm-02&lt;/DIV&gt;
&lt;DIV&gt;Empty MOVE 2 2 44 blue blue Rm-03 29700 54900 0 blue 29700 Rm-03&lt;/DIV&gt;
&lt;DIV&gt;R5 BAR 2 2 44 blue blue Rm-03 29700 54900 0 blue 54900 Rm-03&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the output&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gplot.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48853i99511D90A9780893/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gplot.png" alt="gplot.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 22:49:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680829#M20441</guid>
      <dc:creator>SSTEAD</dc:creator>
      <dc:date>2020-09-01T22:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680830#M20442</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;
&lt;P&gt;However, bar does not have the 'R2' &amp;nbsp;pattern applied. The anno file has the 'R2' in style, but it is not applied.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;style color function xsys ysys size BlkHldrLabel text location starttime endtime line x yc position&lt;/DIV&gt;
&lt;DIV&gt;solidredmove2244redRm-012880055800128800Rm-01&lt;/DIV&gt;
&lt;DIV&gt;solidredbar2244redRm-012880055800155800Rm-01&lt;/DIV&gt;
&lt;DIV&gt;Arial Black white label 2 2 3 red Rm-01 28800 55800 1 28800 Rm-01 6&lt;/DIV&gt;
&lt;DIV&gt;R2light greymove223whiteRm-023060057600130600Rm-02&lt;/DIV&gt;
&lt;DIV&gt;R2light greybar2244whiteRm-023060057600157600Rm-02&lt;/DIV&gt;
&lt;DIV&gt;Arial Black white label 2 2 3 white Rm-02 30600 57600 1 30600 Rm-02 6&lt;/DIV&gt;
&lt;DIV&gt;solidbluemove223blueRm-032970054900129700Rm-03&lt;/DIV&gt;
&lt;DIV&gt;solidbluebar2244blueRm-032970054900154900Rm-03&lt;/DIV&gt;
&lt;DIV&gt;Arial Black white label 2 2 3 blue Rm-03 29700 54900 1 29700 Rm-03 6&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 22:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680830#M20442</guid>
      <dc:creator>SSTEAD</dc:creator>
      <dc:date>2020-09-01T22:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680836#M20443</link>
      <description>&lt;P&gt;Thank you very much. I sincerely appreciate the feedback.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, bar does not have the 'R2' &amp;nbsp;pattern applied. The anno file has the 'R2' in style, but it is not applied.&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="screenshot_130.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48855i3A8E6667DC490B1C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="screenshot_130.png" alt="screenshot_130.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 23:15:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680836#M20443</guid>
      <dc:creator>SSTEAD</dc:creator>
      <dc:date>2020-09-01T23:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680846#M20444</link>
      <description>Does R2 show up if you comment out this function statement?:&lt;BR /&gt; /* function='label' ; color='white'; size=3 ; style='Arial Black';  position ='6' ;&lt;BR /&gt;   x=StartTime ; yc=location; output; */&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Sep 2020 01:47:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/680846#M20444</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2020-09-02T01:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/681059#M20450</link>
      <description>&lt;P&gt;In this case, your 'bar' is infinitely thin, because both the bottom edge and top edge has the same yc y-coordinate ... therefore the bar has no area to plot the r1 pattern in.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are getting what 'looks' like a bar just by luck, because you are specifying a very large size variable. The size is basically the width of the line drawn around the box ... and the line bounding the box is always drawn solid. So the solid color you're seeing is the color of the very thick line drawn around the box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 16:49:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/681059#M20450</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2020-09-02T16:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/681078#M20451</link>
      <description>&lt;P&gt;Here's one alternative way to draw/annotate the bars - rather than using the same y-value for the move/bar, use a relative coordinate system, and set the top/right corner of the bar 5% above the bottom/left y (see bold code below):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data source;&lt;BR /&gt;length color text $8. ;&lt;BR /&gt;location = 'Rm-01'; starttime='08:00't; endtime='15:30't; color = 'red'; text= 'red'; output;&lt;BR /&gt;location = 'Rm-02'; starttime='08:30't; endtime='16:00't; color = 'white'; text= 'white'; output;&lt;BR /&gt;location = 'Rm-03'; starttime='08:15't; endtime='15:15't; color = 'blue'; text= 'blue';output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data anno;&lt;BR /&gt;length style $5 color $12 function $12;&lt;BR /&gt;set source;&lt;BR /&gt;xsys='2'; ysys='2'; hsys='3';&lt;BR /&gt;style='solid';&lt;BR /&gt;if color='white' then do; style='r1'; color='gray99'; end;&lt;BR /&gt;function='move'; x=StartTime; ysys='2'; yc=location; output;&lt;BR /&gt;function='bar'; x=EndTime; &lt;STRONG&gt;ysys='b'; y=5;&lt;/STRONG&gt; line=0; output;&lt;BR /&gt;function='label'; color='grau77'; size=4.0; style='Arial'; ysys='2'; position ='c';&lt;BR /&gt;x=StartTime ; yc=location; output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;symbol1 i=none;&lt;BR /&gt;axis1 label=none offset=(1,4);&lt;BR /&gt;axis2 order=(21600 to 72000 by 3600) minor=none label=(h=1.5 "Time of Day") Value=(h=1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc gplot data=source annotate=anno;&lt;BR /&gt;plot location*EndTime/vaxis=axis1 haxis=axis2 VREVERSE&lt;BR /&gt;href= 21600 25200 28800 32400 36000 39600 43200&lt;BR /&gt;50400 54000 57600 61200 64800 68400 72000&lt;BR /&gt;lhref=4;&lt;BR /&gt;format EndTime time5.;&lt;BR /&gt;run;&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="bar.png" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48906i1028C8E4734B9240/image-size/large?v=v2&amp;amp;px=999" role="button" title="bar.png" alt="bar.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 17:08:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/681078#M20451</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2020-09-02T17:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: proc gplot Annotate BAR function with character coordinate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/681108#M20452</link>
      <description>&lt;P&gt;Bob,&lt;/P&gt;
&lt;P&gt;This was exactly what I was looking to do.&lt;/P&gt;
&lt;P&gt;The insights are: I was manipulating the line, not the bar and that I need to use a relative coordinate system, as opposed to size, to control width.&lt;/P&gt;
&lt;P&gt;Thank you so much.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 17:44:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-gplot-Annotate-BAR-function-with-character-coordinate/m-p/681108#M20452</guid>
      <dc:creator>SSTEAD</dc:creator>
      <dc:date>2020-09-02T17:44:47Z</dc:date>
    </item>
  </channel>
</rss>

