<?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: How to specify different colors on DATALABELATTRS? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837430#M20589</link>
    <description>&lt;P&gt;Thanks a lot, that worked just fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you help me with one last question. I am struggling to find a statement now for changing the location of the labels using the "markerchar="&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See below how they are being plotted on the chart now.&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="edison83_0-1665157270513.png" style="width: 549px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76018iA8BA846D228766EE/image-dimensions/549x408?v=v2" width="549" height="408" role="button" title="edison83_0-1665157270513.png" alt="edison83_0-1665157270513.png" /&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>Fri, 07 Oct 2022 15:41:31 GMT</pubDate>
    <dc:creator>edison83</dc:creator>
    <dc:date>2022-10-07T15:41:31Z</dc:date>
    <item>
      <title>How to specify different colors on DATALABELATTRS?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837274#M20587</link>
      <description>&lt;P&gt;Hi everyone, maybe it is a dumb question for you guys expert on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following code but i would like to have the % values to have the same color for each respective line color.&lt;/P&gt;
&lt;P&gt;In other words, the three % values on top of the red line to be also red, the values of the blue dashed line to be blue, and the respective green line values to be also green.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am I missing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics on / ATTRPRIORITY=NONE;&lt;BR /&gt;proc sgplot data=m3 noborder ;&lt;BR /&gt;scatter x=PRRSV2 y=Mu3 / group=PRRSresult1 &lt;BR /&gt;yerrorupper=upperMux2 yerrorlower=LowerMux2 group=PRRSresult1 groupdisplay=cluster clusterwidth=0.05 ;&lt;BR /&gt;series x=PRRSV2 y=Mu3 / group=PRRSresult1 GROUPLC=PRRSresult1 GROUPLP=PRRSresult1 GROUPMC=PRRSresult1 &lt;BR /&gt;DATALABEL=Mu4 lineattrs=(thickness=3px) &lt;STRONG&gt;&lt;FONT color="#800000"&gt;DATALABELATTRS=(Color=black&lt;/FONT&gt;&lt;/STRONG&gt; Family="Times" Size=10 Style=normal Weight=bold) name="series" ;&lt;BR /&gt;styleattrs datacontrastcolors=(VIYG VIGB VIPK) datalinepatterns=(solid dash 16) DATASYMBOLS=(circleFilled SquareFilled) ;&lt;BR /&gt;xaxis VALUEATTRS=(Color=black Family=times Size=12 &lt;BR /&gt;Style=normal Weight=bold) label='Dx Code - PRRS' labelattrs=(size = 14) type=discrete;&lt;BR /&gt;yaxis VALUEATTRS=(Color=black Family=times Size=12 &lt;BR /&gt;Style=normal Weight=bold)label='W2F mortality (%)' labelattrs=(size = 14);&lt;BR /&gt;keylegend "series" / titleattrs=(weight=bold size = 10) location=inside position=topleft across=1 title= "Sow farm PRRS status";&lt;BR /&gt;title "(Sow farm PRRS status) * (Dx Code - PRRS)";&lt;BR /&gt;run;&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="edison83_0-1665087298995.png" style="width: 642px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75990iE0DC215B3E13BD73/image-dimensions/642x488?v=v2" width="642" height="488" role="button" title="edison83_0-1665087298995.png" alt="edison83_0-1665087298995.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 20:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837274#M20587</guid>
      <dc:creator>edison83</dc:creator>
      <dc:date>2022-10-06T20:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify different colors on DATALABELATTRS?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837350#M20588</link>
      <description>Remove &lt;BR /&gt;"DATALABEL=Mu4"&lt;BR /&gt;and add one more SCATTER&lt;BR /&gt;" scatter x=PRRSV2 y=Mu3 /markerchar=Mu4 discreteoffset=0.5 ;  "</description>
      <pubDate>Fri, 07 Oct 2022 10:32:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837350#M20588</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-07T10:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify different colors on DATALABELATTRS?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837430#M20589</link>
      <description>&lt;P&gt;Thanks a lot, that worked just fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you help me with one last question. I am struggling to find a statement now for changing the location of the labels using the "markerchar="&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See below how they are being plotted on the chart now.&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="edison83_0-1665157270513.png" style="width: 549px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76018iA8BA846D228766EE/image-dimensions/549x408?v=v2" width="549" height="408" role="button" title="edison83_0-1665157270513.png" alt="edison83_0-1665157270513.png" /&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>Fri, 07 Oct 2022 15:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837430#M20589</guid>
      <dc:creator>edison83</dc:creator>
      <dc:date>2022-10-07T15:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify different colors on DATALABELATTRS?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837518#M20590</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*or using TEXT statement instead of markerchar= */
proc sgplot data=sashelp.class nocycleattrs;
scatter x=age y=height/ group=sex;
text x=age y=height text=name/strip contributeoffsets=none group=sex position=ne ; /*position=nw|se|sw|top|bottom*/
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1665233315046.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76028i5E327ED35B985DEB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1665233315046.png" alt="Ksharp_0-1665233315046.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*or make a new variable to relocate "markerchar="*/
data class;
 set sashelp.class;
 new_height=height+1;
run;
proc sgplot data=class nocycleattrs;
scatter x=age y=height/ group=sex;
scatter x=age y=new_height /markerchar=name group=sex ; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Oct 2022 12:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837518#M20590</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-10-08T12:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify different colors on DATALABELATTRS?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837701#M20591</link>
      <description>Thanks, that worked just fine!</description>
      <pubDate>Mon, 10 Oct 2022 16:35:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-specify-different-colors-on-DATALABELATTRS/m-p/837701#M20591</guid>
      <dc:creator>edison83</dc:creator>
      <dc:date>2022-10-10T16:35:00Z</dc:date>
    </item>
  </channel>
</rss>

