<?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: label between bars in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/label-between-bars/m-p/194491#M7209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To place anything on a discrete axis in a place other than the midpoint value, use the DISCRETEOFFSET attribute.&amp;nbsp; To put something halfway between A and B (adjacent values), use XC1='A' and DiscreteOffset=0.5&amp;nbsp; OR &lt;SPAN style="font-size: 13.3333330154419px;"&gt;XC1='B' and DiscreteOffset= -0.5.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 May 2015 20:59:14 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2015-05-27T20:59:14Z</dc:date>
    <item>
      <title>label between bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/label-between-bars/m-p/194490#M7208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAS experts,&lt;/P&gt;&lt;P&gt;I try to use annotation to place a label in between two bars. But I can only put it on top of one bar, and don't know how to put it in between two bars.&lt;/P&gt;&lt;P&gt;In the below code, I try to place the label "p=0.001" in between bars "RC and "RF".&amp;nbsp; In another word, I try to put the label on top-middle of the the line generated by the code &lt;/P&gt;&lt;P&gt;function=&amp;nbsp; "polycont"; xc1="RC"; y1=49;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;function=&amp;nbsp; "polycont"; xc1="RF"; y1=49;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to give a large value of width, it didn't work either. It always sits on top of the "RC" bar.&lt;/P&gt;&lt;P&gt;Can anybody help me? &lt;/P&gt;&lt;P&gt;I am using SAS 9.3 M1.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Juen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;data bites_results;&amp;nbsp;&amp;nbsp; * bites per 100 kcal;&lt;/P&gt;&lt;P&gt;input meal $ 1-31 diet $ 32-37 size bites bites_SE;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;&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; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33.2941176&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.0170969&lt;/P&gt;&lt;P&gt;&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; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 43.2173913&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.5683976&lt;/P&gt;&lt;P&gt;&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; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 46.9565217&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.1526204&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data bites_results; set bites_results;&lt;/P&gt;&lt;P&gt;meal= compress(meal);&lt;/P&gt;&lt;P&gt;upper=bites + bites_SE;&lt;/P&gt;&lt;P&gt;lower=bites - bites_SE;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data anno;&lt;/P&gt;&lt;P&gt;length xc1 $2;&lt;/P&gt;&lt;P&gt;retain drawspace "datavalue" linethickness 4;&lt;/P&gt;&lt;P&gt;function = "polyline"; xc1="RC"; y1= 37; output;&lt;/P&gt;&lt;P&gt;function=&amp;nbsp; "polycont"; xc1="RC"; y1=49;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;function=&amp;nbsp; "polycont"; xc1="RF"; y1=49;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;function=&amp;nbsp; "polycont"; xc1="RF"; y1=47;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;function=&amp;nbsp; "text";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xc1="RC"; y1=50; label= "p=0.001"; textsize=15;&amp;nbsp; width=100; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sgplot data=bites_results sganno=anno;&lt;/P&gt;&lt;P&gt;vbarparm category=diet response= bites /limitupper = upper limitlower=lower LIMITATTRS=(thickness=2) ;&lt;/P&gt;&lt;P&gt;yaxis label="Bite Count" labelattrs=(size=20) valueattrs=(size=20) offsetmin = 0;&lt;/P&gt;&lt;P&gt;xaxis display=(nolabel) valueattrs=(size=20) ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 20:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/label-between-bars/m-p/194490#M7208</guid>
      <dc:creator>Juen</dc:creator>
      <dc:date>2015-05-27T20:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: label between bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/label-between-bars/m-p/194491#M7209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To place anything on a discrete axis in a place other than the midpoint value, use the DISCRETEOFFSET attribute.&amp;nbsp; To put something halfway between A and B (adjacent values), use XC1='A' and DiscreteOffset=0.5&amp;nbsp; OR &lt;SPAN style="font-size: 13.3333330154419px;"&gt;XC1='B' and DiscreteOffset= -0.5.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 20:59:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/label-between-bars/m-p/194491#M7209</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-05-27T20:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: label between bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/label-between-bars/m-p/194492#M7210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. It does the trick. &lt;/P&gt;&lt;P&gt;Below is my code just in case others may be interested.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;function=&amp;nbsp; "text"; &lt;/TD&gt;&lt;TD&gt;xc1="RC"; DiscreteOffset=0.5; y1=50; label= "p=0.001"; textsize=15;&amp;nbsp; width=100; output;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Juen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 21:40:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/label-between-bars/m-p/194492#M7210</guid>
      <dc:creator>Juen</dc:creator>
      <dc:date>2015-05-27T21:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: label between bars</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/label-between-bars/m-p/194493#M7211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FYI...It is also possible to place text in the graph using the MARKERCHAR option of the SCATTER plot.&amp;nbsp; The data can come from the procedure data set and you can use DiscreteOffset the same way.&amp;nbsp; With SAS 9.4M2, you can also use the TEXT statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 21:47:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/label-between-bars/m-p/194493#M7211</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-05-27T21:47:34Z</dc:date>
    </item>
  </channel>
</rss>

