<?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 Annotating Class Graphs Individually: Comparison histogram needs separate labels on each histogram. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Annotating-Class-Graphs-Individually-Comparison-histogram-needs/m-p/470335#M16208</link>
    <description>&lt;P&gt;I am trying to create a comparative histogram with separate labels on each graph. I included the code I am using below. The first block is creating the annotations and the second is the univariate procedure to create the histograms. It's separated by class and there are 2 classes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to create the labels first? If not, can you label a histogram after it has been created?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* Note: I changed several macros for clarity, but some formatting may have been messed up in the process. The code works fine and the label works, I just need separate labels.&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="Picture1.jpg.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21196iAE18CD469593BDEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture1.jpg.png" alt="Picture1.jpg.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%ANNOMAC()&lt;BR /&gt;DATA ANNO;&lt;BR /&gt;LENGTH TEXT $100;&lt;BR /&gt;WHEN='A';&lt;BR /&gt;%SYSTEM(2, 1)&lt;BR /&gt;%LINE(&amp;amp;threshold.,0, &amp;amp;threshold.,100, black, 2, 1)&lt;BR /&gt;%LABEL(&amp;amp;labelposition., 90, "&amp;amp;thresholdlabel", black, 0, 0, 2.4, 'Albany AMT', &amp;amp;labelalign.)&lt;BR /&gt;%LABEL(&amp;amp;labelposition., 80, "&amp;amp;providerlabel", black, 0, 0, 2.1, 'Albany AMT', &amp;amp;labelalign.)&lt;BR /&gt;%ARROW (&amp;amp;arrowx1., &amp;amp;arrowy., &amp;amp;arrowx2., &amp;amp;arrowy., black, 1, 1, 90, open)&lt;BR /&gt;;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PROC UNIVARIATE DATA= sample NOPRINT;&lt;BR /&gt;Class model&lt;BR /&gt;FORMAT percent_of_Providers PERCENT8.2;&lt;BR /&gt;VAR percent_of_Providers;&lt;BR /&gt;HISTOGRAM percent_of_Providers&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/anno=ANNO NOFRAME CFILL=BWH CBARLINE=BIGB VSCALE=PERCENT HEIGHT=4 BARLABEL=PERCENT&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;VAXISLABEL= &amp;amp;yaxislabel.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MIDPOINTS= 5 to 100&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;BY 10&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;FONT="Albany AMT"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;nrows=2;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jun 2018 14:45:12 GMT</pubDate>
    <dc:creator>kccamillion</dc:creator>
    <dc:date>2018-06-14T14:45:12Z</dc:date>
    <item>
      <title>Annotating Class Graphs Individually: Comparison histogram needs separate labels on each histogram.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Annotating-Class-Graphs-Individually-Comparison-histogram-needs/m-p/470335#M16208</link>
      <description>&lt;P&gt;I am trying to create a comparative histogram with separate labels on each graph. I included the code I am using below. The first block is creating the annotations and the second is the univariate procedure to create the histograms. It's separated by class and there are 2 classes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to create the labels first? If not, can you label a histogram after it has been created?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* Note: I changed several macros for clarity, but some formatting may have been messed up in the process. The code works fine and the label works, I just need separate labels.&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="Picture1.jpg.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21196iAE18CD469593BDEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture1.jpg.png" alt="Picture1.jpg.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%ANNOMAC()&lt;BR /&gt;DATA ANNO;&lt;BR /&gt;LENGTH TEXT $100;&lt;BR /&gt;WHEN='A';&lt;BR /&gt;%SYSTEM(2, 1)&lt;BR /&gt;%LINE(&amp;amp;threshold.,0, &amp;amp;threshold.,100, black, 2, 1)&lt;BR /&gt;%LABEL(&amp;amp;labelposition., 90, "&amp;amp;thresholdlabel", black, 0, 0, 2.4, 'Albany AMT', &amp;amp;labelalign.)&lt;BR /&gt;%LABEL(&amp;amp;labelposition., 80, "&amp;amp;providerlabel", black, 0, 0, 2.1, 'Albany AMT', &amp;amp;labelalign.)&lt;BR /&gt;%ARROW (&amp;amp;arrowx1., &amp;amp;arrowy., &amp;amp;arrowx2., &amp;amp;arrowy., black, 1, 1, 90, open)&lt;BR /&gt;;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PROC UNIVARIATE DATA= sample NOPRINT;&lt;BR /&gt;Class model&lt;BR /&gt;FORMAT percent_of_Providers PERCENT8.2;&lt;BR /&gt;VAR percent_of_Providers;&lt;BR /&gt;HISTOGRAM percent_of_Providers&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/anno=ANNO NOFRAME CFILL=BWH CBARLINE=BIGB VSCALE=PERCENT HEIGHT=4 BARLABEL=PERCENT&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;VAXISLABEL= &amp;amp;yaxislabel.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MIDPOINTS= 5 to 100&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;BY 10&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;FONT="Albany AMT"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;nrows=2;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 14:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Annotating-Class-Graphs-Individually-Comparison-histogram-needs/m-p/470335#M16208</guid>
      <dc:creator>kccamillion</dc:creator>
      <dc:date>2018-06-14T14:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Annotating Class Graphs Individually: Comparison histogram needs separate labels on each histogr</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Annotating-Class-Graphs-Individually-Comparison-histogram-needs/m-p/481333#M16624</link>
      <description>&lt;P&gt;The documentation is clear: the annotation used in your case is a "local" annotation (i.e. it is specific to one statement) and is used "&lt;EM&gt;for plots produced by that statement"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To overlay different text, your best chance is probably to use proc greplay. This works:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc catalog c=GSEG kill; 
run;

data ANNO;
  retain WHEN 'A' XSYS YSYS '1' X Y 80 TEXT 'Anno1' COLOR 'Red' SIZE 2;
run;
                       
proc univariate data=SASHELP.CLASS noprint;
  class SEX;
  var AGE;
  histogram AGE /anno=ANNO barlabel=percent nrows=2 name='UNIV';
run;
                            
proc gslide name='GSLIDE'; 
  note move=(80,80)pct h=2 color=green 'Anno2'; 
run;

proc greplay igout=WORK.GSEG tc=SASHELP.TEMPLT template=WHOLE nofs;
  treplay 1:UNIV 1:GSLIDE ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22023i7779C495AFD43F6E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 03:10:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Annotating-Class-Graphs-Individually-Comparison-histogram-needs/m-p/481333#M16624</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-26T03:10:46Z</dc:date>
    </item>
  </channel>
</rss>

