<?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: ReferenceLine within DataLattice in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69984#M2453</link>
    <description>Reference lines can specified directly (as in your case) or by a column. The column-driven technique enables you to create different reference lines in each cell. You can use the same techinque to control your labels. First, add your reference value and one label to your data. Here is one way to do it:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc sort data=sashelp.class out=temp; by sex; run;&lt;BR /&gt;
&lt;BR /&gt;
data withref;&lt;BR /&gt;
set temp;&lt;BR /&gt;
by sex;&lt;BR /&gt;
if first.sex then do;&lt;BR /&gt;
   refval = 3.7;&lt;BR /&gt;
   if (_n_ = 1) then reflabel="mylabel";&lt;BR /&gt;
   else reflabel=.;&lt;BR /&gt;
end;&lt;BR /&gt;
else do;&lt;BR /&gt;
refval=.;&lt;BR /&gt;
reflabel=.;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Then, change your REFERENCELINE statement to point to those columns:&lt;BR /&gt;
&lt;BR /&gt;
ReferenceLine y=refval / clip=true curvelabel=reflabel &lt;OPTIONS&gt; ;&lt;BR /&gt;
&lt;BR /&gt;
Give that a try and let me know if you get the result you want;&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan&lt;/OPTIONS&gt;</description>
    <pubDate>Fri, 03 Sep 2010 21:50:59 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2010-09-03T21:50:59Z</dc:date>
    <item>
      <title>ReferenceLine within DataLattice</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69981#M2450</link>
      <description>I have a ReferenceLine statement within a layout prototype that is within a layout DataLattice.  The CurveLabel prints several times across the graph, once for every change in the ColumnVar variable value.  Is there a way to get the CurveLabel to print only once, say for either the maximum or minimum value of ColumnVar?</description>
      <pubDate>Fri, 03 Sep 2010 19:10:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69981#M2450</guid>
      <dc:creator>Nobody</dc:creator>
      <dc:date>2010-09-03T19:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceLine within DataLattice</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69982#M2451</link>
      <description>If I'm understanding this scenario correctly, you should be able to duplicate the ColumnVar column, put missing values where you do not want values displayed, and point the ReferenceLine statement at column. Let me know if that works for you.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Fri, 03 Sep 2010 20:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69982#M2451</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-09-03T20:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceLine within DataLattice</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69983#M2452</link>
      <description>Would your method work for a horizontal reference line?  Here is a rough outline of my code;&lt;BR /&gt;
&lt;BR /&gt;
layout gridded / rowgutter=5 border=false ;&lt;BR /&gt;
   layout datalattice columnvar=cohortc / &lt;OPTIONS&gt;...&lt;BR /&gt;
      layout prototype / wallDisplay=(fill) ;&lt;BR /&gt;
         BarChart x=xlbl y=_Mean1_yvar_ / group=weekc &lt;OPTIONS&gt; ;&lt;BR /&gt;
         ScatterPlot X=xlbl Y=_Mean1_yvar_ / &lt;OPTIONS&gt; ;&lt;BR /&gt;
         ReferenceLine y=3.7 / clip=true curvelabel='XXX' &lt;OPTIONS&gt; ;&lt;BR /&gt;
     endlayout ;&lt;BR /&gt;
   endlayout ;&lt;BR /&gt;
endlayout ;&lt;BR /&gt;
&lt;BR /&gt;
If ReferenceLine takes either x= or y= as input (but not both) I am not clear how I can point it at &lt;COLUMNVAR&gt; and still get a horizontal reference line.&lt;/COLUMNVAR&gt;&lt;/OPTIONS&gt;&lt;/OPTIONS&gt;&lt;/OPTIONS&gt;&lt;/OPTIONS&gt;</description>
      <pubDate>Fri, 03 Sep 2010 21:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69983#M2452</guid>
      <dc:creator>Nobody</dc:creator>
      <dc:date>2010-09-03T21:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceLine within DataLattice</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69984#M2453</link>
      <description>Reference lines can specified directly (as in your case) or by a column. The column-driven technique enables you to create different reference lines in each cell. You can use the same techinque to control your labels. First, add your reference value and one label to your data. Here is one way to do it:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc sort data=sashelp.class out=temp; by sex; run;&lt;BR /&gt;
&lt;BR /&gt;
data withref;&lt;BR /&gt;
set temp;&lt;BR /&gt;
by sex;&lt;BR /&gt;
if first.sex then do;&lt;BR /&gt;
   refval = 3.7;&lt;BR /&gt;
   if (_n_ = 1) then reflabel="mylabel";&lt;BR /&gt;
   else reflabel=.;&lt;BR /&gt;
end;&lt;BR /&gt;
else do;&lt;BR /&gt;
refval=.;&lt;BR /&gt;
reflabel=.;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Then, change your REFERENCELINE statement to point to those columns:&lt;BR /&gt;
&lt;BR /&gt;
ReferenceLine y=refval / clip=true curvelabel=reflabel &lt;OPTIONS&gt; ;&lt;BR /&gt;
&lt;BR /&gt;
Give that a try and let me know if you get the result you want;&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan&lt;/OPTIONS&gt;</description>
      <pubDate>Fri, 03 Sep 2010 21:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69984#M2453</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-09-03T21:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceLine within DataLattice</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69985#M2454</link>
      <description>Thank you very much Dan.  That solution was so easy I'm embarrassed that I even had to ask.  I need to read the documentation more closely.</description>
      <pubDate>Fri, 03 Sep 2010 22:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ReferenceLine-within-DataLattice/m-p/69985#M2454</guid>
      <dc:creator>Nobody</dc:creator>
      <dc:date>2010-09-03T22:24:51Z</dc:date>
    </item>
  </channel>
</rss>

