<?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 drawtext for data labels ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/drawtext-for-data-labels/m-p/353250#M82447</link>
    <description>&lt;P&gt;This is my first time dealing with annotation.&lt;/P&gt;&lt;P&gt;I have decided to utilize&amp;nbsp;annotation&amp;nbsp;because I will be generating several graphs and I want to be sure I&amp;nbsp;don't have issues with my error bars running into my labels.&amp;nbsp; Ideally, I would like my labels to be located inside the bars at the base of each bar.&lt;/P&gt;&lt;P&gt;I am trying to insert&amp;nbsp;labels (data labels)&amp;nbsp;into my proc template barchartparm.&amp;nbsp; Is it&amp;nbsp;possible to do this with drawtext if i am using values of a variable for my bar labels ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008000" face="Courier New"&gt;template&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;define&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;statgraph&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; district;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;begingraph&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; / datacolors=(white CXEBDDED CXEBDDED CXEBDDED CXEBDDED CXEBDDED CXEBDDED CXEBDDED) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;layout&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;overlay&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; / &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;walldisplay&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(fill) &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;xaxisopts&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(display=( line tickvalues)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;DISCRETEOPTS=(TICKVALUEFITPOLICY =split))&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;yaxisopts&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=( offsetmin=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; linearopts=(viewmin=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; viewmax=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;100&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; tickvaluelist=(&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt; &lt;FONT color="#00ae00" face="Courier New"&gt;50&lt;/FONT&gt; &lt;FONT color="#00ae00" face="Courier New"&gt;100&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;)));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;/* drawtext textattrs=(size=8pt) "variable" /width=5 widthunit=percent xspace=datavalue yspace=graphpercent x=2*/&lt;/P&gt;&lt;P&gt;/* y=80 justify=center;*/&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;barchartparm&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;x&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;y&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=percent / &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;group&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district groupdisplay=cluster &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;errorupper&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=uppct &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;errorlower&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=lowpct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;ERRORBARATTRS&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(color=black)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;OUTLINEATTRS&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(color=black) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;/* scatterplot y=percent x=district / datalabel=percent */&lt;/P&gt;&lt;P&gt;/*DATALABELPOSITION=topright DATALABELATTRS=GRAPHVALUETEXT(SIZE=10pt weight=bold)&lt;/P&gt;&lt;P&gt;markerattrs=(size=0) ;*/&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;annotate&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;endlayout&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;endgraph&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;end&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008000" face="Courier New"&gt;sgrender&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#008080" face="Courier New"&gt;data&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;template&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district sganno=anno;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;format&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; district &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;district.&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the following code inserts "variable" into my graph.&amp;nbsp; I want it to insert percent values from my variable.&lt;/P&gt;&lt;P&gt;drawtext textattrs=(size=8pt) "variable" /width=5 widthunit=percent xspace=datavalue yspace=graphpercent x=2&lt;/P&gt;&lt;P&gt;&amp;nbsp;y=80 justify=center;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried using an annotated data set which gave me the&amp;nbsp;following error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: FUNCTION=label in the annotation data set is invalid.&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; anno;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;length&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; function color text $ &lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;8&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;retain&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; function &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'label'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; color &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'black'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; when &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'a'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080" face="Courier New"&gt;xsys ysys &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'2'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; position &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'2'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; size &lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;3&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; hsys &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'3'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;set&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; district; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080" face="Courier New"&gt;midpoint=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;VAR.&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;group=district;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080" face="Courier New"&gt;function=&lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'label'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; xsys=&lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'2'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; ysys=&lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'2'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; x=midpoint; y=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; text=left(put(percent,&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;4.1&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;)); size=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;5&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;output&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me the best way to go about doing this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Apr 2017 15:46:48 GMT</pubDate>
    <dc:creator>Whitlea</dc:creator>
    <dc:date>2017-04-25T15:46:48Z</dc:date>
    <item>
      <title>drawtext for data labels ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drawtext-for-data-labels/m-p/353250#M82447</link>
      <description>&lt;P&gt;This is my first time dealing with annotation.&lt;/P&gt;&lt;P&gt;I have decided to utilize&amp;nbsp;annotation&amp;nbsp;because I will be generating several graphs and I want to be sure I&amp;nbsp;don't have issues with my error bars running into my labels.&amp;nbsp; Ideally, I would like my labels to be located inside the bars at the base of each bar.&lt;/P&gt;&lt;P&gt;I am trying to insert&amp;nbsp;labels (data labels)&amp;nbsp;into my proc template barchartparm.&amp;nbsp; Is it&amp;nbsp;possible to do this with drawtext if i am using values of a variable for my bar labels ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008000" face="Courier New"&gt;template&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;define&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;statgraph&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; district;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;begingraph&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; / datacolors=(white CXEBDDED CXEBDDED CXEBDDED CXEBDDED CXEBDDED CXEBDDED CXEBDDED) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;layout&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;overlay&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; / &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;walldisplay&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(fill) &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;xaxisopts&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(display=( line tickvalues)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;DISCRETEOPTS=(TICKVALUEFITPOLICY =split))&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;yaxisopts&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=( offsetmin=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; linearopts=(viewmin=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; viewmax=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;100&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; tickvaluelist=(&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt; &lt;FONT color="#00ae00" face="Courier New"&gt;50&lt;/FONT&gt; &lt;FONT color="#00ae00" face="Courier New"&gt;100&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;)));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;/* drawtext textattrs=(size=8pt) "variable" /width=5 widthunit=percent xspace=datavalue yspace=graphpercent x=2*/&lt;/P&gt;&lt;P&gt;/* y=80 justify=center;*/&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;barchartparm&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;x&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;y&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=percent / &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;group&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district groupdisplay=cluster &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;errorupper&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=uppct &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;errorlower&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=lowpct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;ERRORBARATTRS&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(color=black)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;OUTLINEATTRS&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(color=black) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;/* scatterplot y=percent x=district / datalabel=percent */&lt;/P&gt;&lt;P&gt;/*DATALABELPOSITION=topright DATALABELATTRS=GRAPHVALUETEXT(SIZE=10pt weight=bold)&lt;/P&gt;&lt;P&gt;markerattrs=(size=0) ;*/&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;annotate&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;endlayout&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;endgraph&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;end&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008000" face="Courier New"&gt;sgrender&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#008080" face="Courier New"&gt;data&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;template&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district sganno=anno;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;format&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; district &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;district.&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the following code inserts "variable" into my graph.&amp;nbsp; I want it to insert percent values from my variable.&lt;/P&gt;&lt;P&gt;drawtext textattrs=(size=8pt) "variable" /width=5 widthunit=percent xspace=datavalue yspace=graphpercent x=2&lt;/P&gt;&lt;P&gt;&amp;nbsp;y=80 justify=center;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried using an annotated data set which gave me the&amp;nbsp;following error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: FUNCTION=label in the annotation data set is invalid.&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; anno;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;length&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; function color text $ &lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;8&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;retain&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; function &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'label'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; color &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'black'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; when &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'a'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080" face="Courier New"&gt;xsys ysys &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'2'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; position &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'2'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; size &lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;3&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; hsys &lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'3'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;set&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; district; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080" face="Courier New"&gt;midpoint=&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New"&gt;VAR.&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;group=district;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080" face="Courier New"&gt;function=&lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'label'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; xsys=&lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'2'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; ysys=&lt;/FONT&gt;&lt;FONT color="#000080" face="Courier New"&gt;'2'&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; x=midpoint; y=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; text=left(put(percent,&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;4.1&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;)); size=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;5&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;output&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone tell me the best way to go about doing this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 15:46:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drawtext-for-data-labels/m-p/353250#M82447</guid>
      <dc:creator>Whitlea</dc:creator>
      <dc:date>2017-04-25T15:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: drawtext for data labels ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/drawtext-for-data-labels/m-p/353308#M82462</link>
      <description>&lt;P&gt;I just found a way around the annotated data set by using an additional scatterplot ...&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; District;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;set&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; desc_out;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080" face="Courier New"&gt;dataloc=lowpct-&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;2&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008000" face="Courier New"&gt;template&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;define&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;statgraph&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; district;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;begingraph&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; / datacolors=(white CXEBDDED CXEBDDED CXEBDDED CXEBDDED CXEBDDED CXEBDDED CXEBDDED) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;layout&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;overlay&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; / &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;walldisplay&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(fill) &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;xaxisopts&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(display=( line tickvalues)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;DISCRETEOPTS=(TICKVALUEFITPOLICY =split))&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;yaxisopts&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=( offsetmin=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; linearopts=(viewmin=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; viewmax=&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;100&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt; tickvaluelist=(&lt;/FONT&gt;&lt;FONT color="#00ae00" face="Courier New"&gt;0&lt;/FONT&gt; &lt;FONT color="#00ae00" face="Courier New"&gt;50&lt;/FONT&gt; &lt;FONT color="#00ae00" face="Courier New"&gt;100&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;)));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;barchartparm&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;x&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;y&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=percent / &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;group&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district groupdisplay=cluster &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;errorupper&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=uppct &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;errorlower&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=lowpct&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;ERRORBARATTRS&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(color=black)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;OUTLINEATTRS&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=(color=black) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;scatterplot&lt;/FONT&gt; &lt;FONT color="#008080" face="Courier New"&gt;y&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=dataloc &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;x&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=district / &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;markercharacter&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;=percent ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;endlayout&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;endgraph&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008080" face="Courier New"&gt;end&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#808080" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 17:14:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/drawtext-for-data-labels/m-p/353308#M82462</guid>
      <dc:creator>Whitlea</dc:creator>
      <dc:date>2017-04-25T17:14:07Z</dc:date>
    </item>
  </channel>
</rss>

