<?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 Advanced question: Proc Gplot and POINTLABEL option in Symbol statement in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12152#M1561</link>
    <description>I am using the following code (pay attention to symbol3 in particular):&lt;BR /&gt;
&lt;BR /&gt;
goptions reset=all;&lt;BR /&gt;
Proc Gplot data=set5;&lt;BR /&gt;
plot ucl*N=alpha / vaxis=axis1 haxis=axis2 legend=legend1 vref=.03 cvref=ltgray lvref=2 noframe;&lt;BR /&gt;
symbol1 c=yellow i=join h=.5;&lt;BR /&gt;
symbol2 c=lime i=join h=.5;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;symbol3 v=dot cv=black pointlabel=("#threshold" c=black position=top);&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
axis1 order=(0 to .5 by .1) label=(a=90 c=black "Upper Confidence Limit (%)")&lt;BR /&gt;
value=(h=1.5 '0%' '10%' '20%' '30%' '40%' '50%') minor=(number=1) color=black;&lt;BR /&gt;
axis2 order=(10 to 120 by 10) label=(c=black "Patients Enrolled") &lt;BR /&gt;
value=(h=1.5) minor=none color=black;&lt;BR /&gt;
legend1 position=(inside top right) value=(c=black h=1.5 "95% CL (Alert)" "80% CL (Watch)" "Threshold") &lt;BR /&gt;
label=none down=3 across=1;&lt;BR /&gt;
Run; Quit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Threshold is a fourth variable (UCL*N), the values of which I want to use as labels at a few given values of N and UCL, along the lines represented by symbol1 and symbol2. The dots are placed appropriately, but the actual pointlabels are missing. This is the note from the log:&lt;BR /&gt;
&lt;BR /&gt;
NOTE: At least one pointlabel has overwritten a boundary.  This resulted in the affected pointlabel(s) being repositioned.&lt;BR /&gt;
&lt;BR /&gt;
I do not understand what it means?</description>
    <pubDate>Fri, 18 Apr 2008 21:39:41 GMT</pubDate>
    <dc:creator>sassygrl</dc:creator>
    <dc:date>2008-04-18T21:39:41Z</dc:date>
    <item>
      <title>Advanced question: Proc Gplot and POINTLABEL option in Symbol statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12152#M1561</link>
      <description>I am using the following code (pay attention to symbol3 in particular):&lt;BR /&gt;
&lt;BR /&gt;
goptions reset=all;&lt;BR /&gt;
Proc Gplot data=set5;&lt;BR /&gt;
plot ucl*N=alpha / vaxis=axis1 haxis=axis2 legend=legend1 vref=.03 cvref=ltgray lvref=2 noframe;&lt;BR /&gt;
symbol1 c=yellow i=join h=.5;&lt;BR /&gt;
symbol2 c=lime i=join h=.5;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;symbol3 v=dot cv=black pointlabel=("#threshold" c=black position=top);&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
axis1 order=(0 to .5 by .1) label=(a=90 c=black "Upper Confidence Limit (%)")&lt;BR /&gt;
value=(h=1.5 '0%' '10%' '20%' '30%' '40%' '50%') minor=(number=1) color=black;&lt;BR /&gt;
axis2 order=(10 to 120 by 10) label=(c=black "Patients Enrolled") &lt;BR /&gt;
value=(h=1.5) minor=none color=black;&lt;BR /&gt;
legend1 position=(inside top right) value=(c=black h=1.5 "95% CL (Alert)" "80% CL (Watch)" "Threshold") &lt;BR /&gt;
label=none down=3 across=1;&lt;BR /&gt;
Run; Quit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Threshold is a fourth variable (UCL*N), the values of which I want to use as labels at a few given values of N and UCL, along the lines represented by symbol1 and symbol2. The dots are placed appropriately, but the actual pointlabels are missing. This is the note from the log:&lt;BR /&gt;
&lt;BR /&gt;
NOTE: At least one pointlabel has overwritten a boundary.  This resulted in the affected pointlabel(s) being repositioned.&lt;BR /&gt;
&lt;BR /&gt;
I do not understand what it means?</description>
      <pubDate>Fri, 18 Apr 2008 21:39:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12152#M1561</guid>
      <dc:creator>sassygrl</dc:creator>
      <dc:date>2008-04-18T21:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced question: Proc Gplot and POINTLABEL option in Symbol statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12153#M1562</link>
      <description>Here is how I defined my dataset if you'd like to try it out. Sorry for the lack of indenting but it wouldn't paste properly:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Data set1;&lt;BR /&gt;
do N=10 to 120;&lt;BR /&gt;
do i=1 to 2;&lt;BR /&gt;
if i=1 then alpha=0.05;&lt;BR /&gt;
if i=2 then alpha=0.2;&lt;BR /&gt;
Outcome='Death'; &lt;BR /&gt;
Rate=.03; &lt;BR /&gt;
output;&lt;BR /&gt;
end;&lt;BR /&gt;
end;&lt;BR /&gt;
Run;&lt;BR /&gt;
&lt;BR /&gt;
Data set2;&lt;BR /&gt;
set set1;&lt;BR /&gt;
z=-probit(alpha/2);&lt;BR /&gt;
lcl=+((2*N*rate+Z*Z-1)-Z*sqrt(Z*Z-(2+1/N)+4*rate*(N*(1-rate)+1)))/2/(N+Z*Z);&lt;BR /&gt;
ucl=+((2*N*rate+Z*Z+1)+Z*sqrt(Z*Z+(2-1/N)+4*rate*(N*(1-rate)-1)))/2/(N+Z*Z);&lt;BR /&gt;
count=N*ucl;&lt;BR /&gt;
if floor(count)=count then threshold=count;&lt;BR /&gt;
else threshold=floor(count)+1;&lt;BR /&gt;
Run;&lt;BR /&gt;
&lt;BR /&gt;
Proc sort data=set2; by outcome alpha n; Run;&lt;BR /&gt;
&lt;BR /&gt;
Data set3;&lt;BR /&gt;
set set2;&lt;BR /&gt;
by outcome alpha threshold;&lt;BR /&gt;
if ^first.threshold then threshold=.;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Data set5;&lt;BR /&gt;
set set2(in=a rename=(alpha=alp)) &lt;BR /&gt;
     set3(in=b where=(threshold^=.) rename=(alpha=alp));&lt;BR /&gt;
if a and alp=.05 then alpha=1;&lt;BR /&gt;
if a and alp=.2  then alpha=2;&lt;BR /&gt;
if b then alpha=3;&lt;BR /&gt;
Run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
And another note....my first attempt was to use the SET2 dataset as-is, but I don't want pointlabels at every single point. Only the ones where threshold changes; hence, set3. Thanks!!!</description>
      <pubDate>Fri, 18 Apr 2008 21:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12153#M1562</guid>
      <dc:creator>sassygrl</dc:creator>
      <dc:date>2008-04-18T21:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced question: Proc Gplot and POINTLABEL option in Symbol statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12154#M1563</link>
      <description>I don't have those note  with the code you have posted&lt;BR /&gt;
the only one i got is&lt;BR /&gt;
WARNING: Can not use MODE=RESERVE and POSITION=(INSIDE). Changed to MODE=PROTECT.  and it disappear as soon as i specify mode=share in legend&lt;BR /&gt;
Your program produce no more note or error!&lt;BR /&gt;
&lt;BR /&gt;
but your problem is related to what the documentation say about pointlabel&lt;BR /&gt;
"The variables that you specify must be the plot's X and Y variables. Specifying any other variables will cause unexpected labeling. "&lt;BR /&gt;
&lt;BR /&gt;
I tried with this code and it seems working avoiding explicitly interpol and allowing repeat 11 times following your max value of threshold&lt;BR /&gt;
&lt;BR /&gt;
[PRE]&lt;BR /&gt;
goptions reset=all ;&lt;BR /&gt;
  Proc Gplot data=set5;&lt;BR /&gt;
 plot ucl*N=alpha / vaxis=axis1 haxis=axis2 legend=legend1 vref=.03 cvref=ltgray lvref=2 noframe;&lt;BR /&gt;
  symbol1 c=yellow i=join h=.5;&lt;BR /&gt;
 symbol2 c=lime i=join h=.5;&lt;BR /&gt;
&lt;BR /&gt;
 SYMBOL3 V=dot i=none repeat=11 pointlabel=(position=top j=l "#threshold") ;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
  axis1 order=(0 to .5 by .1) label=(a=90 c=black "Upper Confidence Limit (%)")&lt;BR /&gt;
      value=(h=1.5 '0%' '10%' '20%' '30%' '40%' '50%') minor=(number=1) color=black;&lt;BR /&gt;
  axis2 order=(10 to 120 by 10) label=(c=black "Patients Enrolled")&lt;BR /&gt;
       value=(h=1.5) minor=none color=black;&lt;BR /&gt;
 legend1 mode=share position=(inside top right) value=(c=black h=1.5 &lt;BR /&gt;
    "95% CL (Alert)" "80% CL(Watch)" "Threshold")&lt;BR /&gt;
    label=none down=3 across=1;&lt;BR /&gt;
 Run;&lt;BR /&gt;
 quit;&lt;BR /&gt;
[/PRE]&lt;BR /&gt;
&lt;BR /&gt;
And i have finally your NOTE  &lt;BR /&gt;
normal as you have 4 5 6 7 8  who are present twice for the alpha=3&lt;BR /&gt;
&lt;BR /&gt;
I hope i have well understand your problem.&lt;BR /&gt;
Andre</description>
      <pubDate>Mon, 21 Apr 2008 10:03:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12154#M1563</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2008-04-21T10:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced question: Proc Gplot and POINTLABEL option in Symbol statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12155#M1564</link>
      <description>Wow, that's perfect! I'm so impressed, thank you so much! I'll have to look into your repeat=11 and j=l options. I'm not sure how, but they worked!</description>
      <pubDate>Mon, 21 Apr 2008 14:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12155#M1564</guid>
      <dc:creator>sassygrl</dc:creator>
      <dc:date>2008-04-21T14:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced question: Proc Gplot and POINTLABEL option in Symbol statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12156#M1565</link>
      <description>the Note, following me, is comming from the number 3 which is printed on the axis&lt;BR /&gt;
so at the limit of the data area!&lt;BR /&gt;
&lt;BR /&gt;
j=l  is only meaning left and it doesn't matter here&lt;BR /&gt;
&lt;BR /&gt;
and the functionning of the repeat is issued from some try&lt;BR /&gt;
&lt;BR /&gt;
as this was working&lt;BR /&gt;
symbol3 v=dot  pointlabel=("#n" c=red position=top);   use of a x ou y&lt;BR /&gt;
and even the following was not working&lt;BR /&gt;
symbol3 v=dot  pointlabel=("#alpha" c=red position=top);  &lt;BR /&gt;
so would i have luck or not? &lt;BR /&gt;
and i tried the repeat=11  but in fact repeat=2 is working already !&lt;BR /&gt;
The mystery in inside Sas.&lt;BR /&gt;
&lt;BR /&gt;
Andre</description>
      <pubDate>Tue, 22 Apr 2008 15:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Advanced-question-Proc-Gplot-and-POINTLABEL-option-in-Symbol/m-p/12156#M1565</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2008-04-22T15:39:31Z</dc:date>
    </item>
  </channel>
</rss>

