<?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 Labelling individual sticks in a stick plot. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Labelling-individual-sticks-in-a-stick-plot/m-p/18942#M412</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I am creating an individual stick plot for each subject, and instead of  having a legend want to label each stick by subject id.&lt;BR /&gt;
&lt;BR /&gt;
I have a different symbol for each subj and different color based on gender. Unable to figure out a way to label the sticks with subject id. can anyone help. Thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
data _null_ ;&lt;BR /&gt;
 set concent end=eof;&lt;BR /&gt;
 retain patcount 0;&lt;BR /&gt;
 by subjid;&lt;BR /&gt;
&lt;BR /&gt;
if first.subjid then patcount+1;&lt;BR /&gt;
&lt;BR /&gt;
 if sex='M' then do;&lt;BR /&gt;
  call symput('sym'||trim(left(patcount)),'symbol'||trim(left(patcount)) || ' '|| 'c'='black'|| ' '||'v=none'||' '|| 'i=join'|| ' ' || 'line=1' || 'width=1' ||';');&lt;BR /&gt;
end;&lt;BR /&gt;
&lt;BR /&gt;
if sex='F' then do;&lt;BR /&gt;
  call symput('sym'||trim(left(patcount)),'symbol'||trim(left(patcount)) || ' '|| 'c'='red'|| ' '||'v=none'||' '|| 'i=join'|| ' ' || 'line=1' || 'width=1' ||';'); &lt;BR /&gt;
end;&lt;BR /&gt;
&lt;BR /&gt;
if eof then call symput('total',patcount);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%put &amp;amp;total. &amp;amp;sym1. ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
/*create a macro that goptions mlogic mprint symbolgenenerates all the symbol statements*/&lt;BR /&gt;
&lt;BR /&gt;
 %macro symbol ;&lt;BR /&gt;
  %do j=1 %to &amp;amp;total;&lt;BR /&gt;
   &amp;amp;&amp;amp;sym&amp;amp;j&lt;BR /&gt;
   %end;&lt;BR /&gt;
 %mend symbol ;&lt;BR /&gt;
&lt;BR /&gt;
%symbol ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
goptions nodisplay;&lt;BR /&gt;
&lt;BR /&gt;
proc gplot data =concent gout=work.mycat;&lt;BR /&gt;
 plot result * visit=subjid /vaxis=axis1 haxis=axis2 nolegend;&lt;BR /&gt;
&lt;BR /&gt;
 axis1 label=(a=90 'Result')&lt;BR /&gt;
       order=(0 to 100 by 10);&lt;BR /&gt;
&lt;BR /&gt;
 axis2 label=('Visit') minor=none;&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
quit;</description>
    <pubDate>Mon, 10 May 2010 18:01:20 GMT</pubDate>
    <dc:creator>vtd17</dc:creator>
    <dc:date>2010-05-10T18:01:20Z</dc:date>
    <item>
      <title>Labelling individual sticks in a stick plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Labelling-individual-sticks-in-a-stick-plot/m-p/18942#M412</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I am creating an individual stick plot for each subject, and instead of  having a legend want to label each stick by subject id.&lt;BR /&gt;
&lt;BR /&gt;
I have a different symbol for each subj and different color based on gender. Unable to figure out a way to label the sticks with subject id. can anyone help. Thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
data _null_ ;&lt;BR /&gt;
 set concent end=eof;&lt;BR /&gt;
 retain patcount 0;&lt;BR /&gt;
 by subjid;&lt;BR /&gt;
&lt;BR /&gt;
if first.subjid then patcount+1;&lt;BR /&gt;
&lt;BR /&gt;
 if sex='M' then do;&lt;BR /&gt;
  call symput('sym'||trim(left(patcount)),'symbol'||trim(left(patcount)) || ' '|| 'c'='black'|| ' '||'v=none'||' '|| 'i=join'|| ' ' || 'line=1' || 'width=1' ||';');&lt;BR /&gt;
end;&lt;BR /&gt;
&lt;BR /&gt;
if sex='F' then do;&lt;BR /&gt;
  call symput('sym'||trim(left(patcount)),'symbol'||trim(left(patcount)) || ' '|| 'c'='red'|| ' '||'v=none'||' '|| 'i=join'|| ' ' || 'line=1' || 'width=1' ||';'); &lt;BR /&gt;
end;&lt;BR /&gt;
&lt;BR /&gt;
if eof then call symput('total',patcount);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%put &amp;amp;total. &amp;amp;sym1. ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
/*create a macro that goptions mlogic mprint symbolgenenerates all the symbol statements*/&lt;BR /&gt;
&lt;BR /&gt;
 %macro symbol ;&lt;BR /&gt;
  %do j=1 %to &amp;amp;total;&lt;BR /&gt;
   &amp;amp;&amp;amp;sym&amp;amp;j&lt;BR /&gt;
   %end;&lt;BR /&gt;
 %mend symbol ;&lt;BR /&gt;
&lt;BR /&gt;
%symbol ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
goptions nodisplay;&lt;BR /&gt;
&lt;BR /&gt;
proc gplot data =concent gout=work.mycat;&lt;BR /&gt;
 plot result * visit=subjid /vaxis=axis1 haxis=axis2 nolegend;&lt;BR /&gt;
&lt;BR /&gt;
 axis1 label=(a=90 'Result')&lt;BR /&gt;
       order=(0 to 100 by 10);&lt;BR /&gt;
&lt;BR /&gt;
 axis2 label=('Visit') minor=none;&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
quit;</description>
      <pubDate>Mon, 10 May 2010 18:01:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Labelling-individual-sticks-in-a-stick-plot/m-p/18942#M412</guid>
      <dc:creator>vtd17</dc:creator>
      <dc:date>2010-05-10T18:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Labelling individual sticks in a stick plot.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Labelling-individual-sticks-in-a-stick-plot/m-p/18943#M413</link>
      <description>I'm not really sure, without the data to try it, but ... I think you could use either pointlabel or annotate.</description>
      <pubDate>Mon, 10 May 2010 18:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Labelling-individual-sticks-in-a-stick-plot/m-p/18943#M413</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-05-10T18:04:55Z</dc:date>
    </item>
  </channel>
</rss>

