<?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: My datalabel position is not in Center even after I use DATALABELPOS=CENTER in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423195#M14580</link>
    <description>&lt;P&gt;Following up on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54&lt;/a&gt;, these steps illustrate a character variable (centered), a numeric variable (and hence leading blanks) (does not appear centered), and a numeric to character conversion and left justification before plotting (centered).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
   scatter y=weight x=height / datalabel=name datalabelpos=center;
quit;

proc sgplot data=sashelp.class;
   scatter y=weight x=height / datalabel=age datalabelpos=center;
quit;

data class;
   set sashelp.class;
   age2 = cats(age);
run;   

proc sgplot data=class;
   scatter y=weight x=height / datalabel=age2 datalabelpos=center;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 Dec 2017 19:18:16 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2017-12-21T19:18:16Z</dc:date>
    <item>
      <title>My datalabel position is not in Center even after I use DATALABELPOS=CENTER</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423190#M14578</link>
      <description>&lt;P&gt;I need to create a plot with MY2R values in the symbol center. But even I used&amp;nbsp;&lt;SPAN&gt;DATALABELPOS=CENTER, all the data labels shift to right and not in the center. Could someone please help me with it? Thanks.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PROC SGPLOT DATA = temp1 dattrmap=attrmap noborder;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Scatter Y=NAME X = MY2R/markerAttrs=(COLOR=purple size=6MM symbol=CIRCLEFILLED)&amp;nbsp; datalabel=MY2R DATALABELATTRS=(size=9pt weight=bold COLOR=White) DATALABELPOS=CENTER transparency=0.1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;XAXIS DISPLAY=(NOTICKS) label=' ' labelattrs=(size=8pt color=Black) values=(60 to 100 by 20) valueattrs=(size=8pt Family=Arial color=black);&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 19:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423190#M14578</guid>
      <dc:creator>hanyi0221</dc:creator>
      <dc:date>2017-12-21T19:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: My datalabel position is not in Center even after I use DATALABELPOS=CENTER</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423192#M14579</link>
      <description>&lt;P&gt;Make sure you do not have leading blanks in your labels.&amp;nbsp; Also, you can use a TEXT plot to display labels with the STRIP option.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 19:12:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423192#M14579</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-12-21T19:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: My datalabel position is not in Center even after I use DATALABELPOS=CENTER</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423195#M14580</link>
      <description>&lt;P&gt;Following up on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54&lt;/a&gt;, these steps illustrate a character variable (centered), a numeric variable (and hence leading blanks) (does not appear centered), and a numeric to character conversion and left justification before plotting (centered).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class;
   scatter y=weight x=height / datalabel=name datalabelpos=center;
quit;

proc sgplot data=sashelp.class;
   scatter y=weight x=height / datalabel=age datalabelpos=center;
quit;

data class;
   set sashelp.class;
   age2 = cats(age);
run;   

proc sgplot data=class;
   scatter y=weight x=height / datalabel=age2 datalabelpos=center;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Dec 2017 19:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423195#M14580</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-21T19:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: My datalabel position is not in Center even after I use DATALABELPOS=CENTER</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423199#M14581</link>
      <description>&lt;P&gt;Thank you Sanjay! My labels do have leading blanks.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 19:29:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423199#M14581</guid>
      <dc:creator>hanyi0221</dc:creator>
      <dc:date>2017-12-21T19:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: My datalabel position is not in Center even after I use DATALABELPOS=CENTER</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423200#M14582</link>
      <description>&lt;P&gt;Thank you Warren, this is very helpful and I will save your post as future reference.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 19:30:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/My-datalabel-position-is-not-in-Center-even-after-I-use/m-p/423200#M14582</guid>
      <dc:creator>hanyi0221</dc:creator>
      <dc:date>2017-12-21T19:30:24Z</dc:date>
    </item>
  </channel>
</rss>

