<?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: SAS Graphs (Annotation Proc Gbarline) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348327#M12098</link>
    <description>&lt;P&gt;I'm not sure about your calculations for the y offset for the annotation.&lt;/P&gt;
&lt;P&gt;I know the below doesn't fit all of your need but you might consider this as a different starting point.&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=work.my_data1 noautolegend ;
   vbar mnm_color /response=count datalabel Fillattrs=(color='cx0049AE');
   vline mnm_color/response=value y2axis datalabel name='vline'
      markers markerattrs=(color='cxF79646' size=10pt symbol=diamondfilled)
      lineattrs=(thickness=0)
   ;
   yaxis label="Per Member Per Year Spend" ;
   y2axis label= 'Trend%' ;
run; &lt;/PRE&gt;
&lt;P&gt;There are additional text options, axis options and attrmap dataset that may help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Apr 2017 22:20:52 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-04-07T22:20:52Z</dc:date>
    <item>
      <title>SAS Graphs (Annotation + Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348283#M12090</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;how can i annotate the values correctly if i have +ve &amp;amp; -ve values in data. My code works well for most, if the value is +ve. If the values are negative then output is disorientated. the annotation values dont tie up with &amp;nbsp;diamond symbol on graph. below is the code,&amp;nbsp;how should i automate if my values are either +ve or -ve . &amp;nbsp;here is the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let name = test;&lt;BR /&gt;PROC FORMAT library=work;&lt;BR /&gt;picture pct0dec (round) low -&amp;lt; 0 = '00009%' (prefix='-')&lt;BR /&gt;0 - high = '00009%' (prefix='');&lt;/P&gt;&lt;P&gt;picture pct1dec (round) low -&amp;lt; 0 = '00009.9%' (prefix='-')&lt;BR /&gt;0 - high = '00009.9%' (prefix='');&lt;/P&gt;&lt;P&gt;picture pct2dec (round) low -&amp;lt; 0 = '00009.99%' (prefix='-')&lt;BR /&gt;0 - high = '00009.99%' (prefix='');&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data my_data1;&lt;BR /&gt;length mnm_color $10;&lt;BR /&gt;format count dollar10. value pct1dec.;&lt;BR /&gt;input mnm_color count value;&lt;BR /&gt;datalines;&lt;BR /&gt;Medical 45 -5.2&lt;BR /&gt;Cat 85 15.3&lt;BR /&gt;IP 65 12.8&lt;BR /&gt;OP 22 28.0&lt;BR /&gt;Prof 13 -3.6&lt;BR /&gt;Other 9 16.3&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;select max(int(value)) into: max_val from work.my_data1;&lt;BR /&gt;quit;&lt;BR /&gt;%put &amp;amp;max_val.;&lt;/P&gt;&lt;P&gt;data myanno_1; set my_data1;&lt;BR /&gt;length function color $8;&lt;BR /&gt;xsys='2'; when='a'; function='label';&lt;BR /&gt;midpoint=mnm_color;&lt;BR /&gt;ysys='1';&lt;BR /&gt;y=0; text=trim(left(put(count,dollar10.)));&lt;BR /&gt;color='green'; position='2';size=2;style='Regular'; output;&lt;BR /&gt;if value &amp;gt; 0 then do;&lt;BR /&gt;y=((value-1.0)/(30-1.0))*100 ;&lt;BR /&gt;text=trim(left(put(value,pct1dec.)));&lt;BR /&gt;color='white'; position='1'; size=2;style='Regular';CBOX='green';output;&lt;BR /&gt;end;&lt;BR /&gt;else if value = 0 then do;&lt;BR /&gt;y=(&amp;amp;max_val.+4)*2;&lt;BR /&gt;text=trim(left(put(value,pct1dec.)));&lt;BR /&gt;color='white'; position='1'; size=2;style='Regular';CBOX='green';output;&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;y = (&amp;amp;max_val.+4)*2;&lt;BR /&gt;text=trim(left(put(value,pct1dec.)));&lt;BR /&gt;color='white'; position='6'; size=2;style='Regular';CBOX='green';output;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*options linesize=MAX pagesize=MAX;*/&lt;BR /&gt;goptions reset=all noborder cback=white htitle=12pt htext=10pt imagestyle= vsize=5in;&lt;BR /&gt;goptions xpixels=525 ypixels=400;&lt;BR /&gt;goptions border;&lt;/P&gt;&lt;P&gt;ODS LISTING CLOSE;&lt;BR /&gt;ODS HTML path='physicalpath' body="&amp;amp;name..htm" style=htmlblue&lt;BR /&gt;gpath='physicalpath/Test.jpg';&lt;/P&gt;&lt;P&gt;goptions ftitle="albany amt/bold" ftext="albany amt/bold"&lt;BR /&gt;gunit=pct ;&lt;BR /&gt;/*htitle=5.0 htext=3.2 ctext=gray33;*/&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;axis1 value=(angle=360 rotate=0) label=none ;&lt;BR /&gt;axis2 label=(angle=90 "Per Member Per Year Spend") value=none ;/*order=(0 to 1100000 by 100000);*/&lt;BR /&gt;axis3 label=(angle=90 "Trend%") label=none value=none order=(-32 to 32 by 2); /*order=(-20 to 20 by 2)*/&lt;BR /&gt;symbol1 interpol=none value=diamondfilled color='#F79646' height=6 ;&lt;BR /&gt;pattern1 v=solid color='#0049AE';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc gbarline data= my_data1;&lt;BR /&gt;/*symbol font= value=diamondfilled co=mob HEIGHT=5 interpol=none ;*/&lt;BR /&gt;bar mnm_color / sumvar=count maxis=axis1 raxis=axis2 NOFRAME Noheading&lt;BR /&gt;midpoints="Medical" "Cat" "IP" "OP" "Prof" "Other" width=16 noaxis anno=myanno_1 ; /*anno=myanno*/&lt;BR /&gt;plot / sumvar=value raxis=axis3 ;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;ODS HTML CLOSE;&lt;BR /&gt;ODS LISTING;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 19:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348283#M12090</guid>
      <dc:creator>pmksasbi</dc:creator>
      <dc:date>2017-04-07T19:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs (Annotation + Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348291#M12092</link>
      <description>&lt;P&gt;Without data to plot (the actual data not the annotate) or a picture of the result it isn't quite clear what your issue is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do know that I would strongly suggest looking at Proc SGPlot with Vbar and Vline statements as Gbarline is pretty limited to the main display.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 20:24:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348291#M12092</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-07T20:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs (Annotation + Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348296#M12093</link>
      <description>&lt;P&gt;data my_data1; length mnm_color $10; format count dollar10. value pct1dec.; input mnm_color count value; datalines; Medical 45 -5.2 Cat 85 15.3 IP 65 12.8 OP 22 28.0 Prof 13 -3.6 Other 9 16.3 ; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the sample data i am using.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 20:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348296#M12093</guid>
      <dc:creator>pmksasbi</dc:creator>
      <dc:date>2017-04-07T20:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs (Annotation + Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348309#M12095</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/84678"&gt;@pmksasbi&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;data my_data1; length mnm_color $10; format count dollar10. value pct1dec.; input mnm_color count value; datalines; Medical 45 -5.2 Cat 85 15.3 IP 65 12.8 OP 22 28.0 Prof 13 -3.6 Other 9 16.3 ; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is the sample data i am using.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And you have a good example why code and log results should be pasted into a code box using the forum {i} icon.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 21:26:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348309#M12095</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-07T21:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs (Annotation + Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348316#M12096</link>
      <description>&lt;P&gt;I get an error from this line:&lt;/P&gt;
&lt;P&gt;symbol1 interpol=none value=diamondfilled color='#F79646' height=6 ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At least in my install diamondfilled is not acceptable for SYBMOL statement value and generates an error.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 21:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348316#M12096</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-07T21:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs (Annotation Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348318#M12097</link>
      <description>Can you please use circle&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Fri, 07 Apr 2017 21:40:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348318#M12097</guid>
      <dc:creator>pmksasbi</dc:creator>
      <dc:date>2017-04-07T21:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs (Annotation Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348327#M12098</link>
      <description>&lt;P&gt;I'm not sure about your calculations for the y offset for the annotation.&lt;/P&gt;
&lt;P&gt;I know the below doesn't fit all of your need but you might consider this as a different starting point.&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=work.my_data1 noautolegend ;
   vbar mnm_color /response=count datalabel Fillattrs=(color='cx0049AE');
   vline mnm_color/response=value y2axis datalabel name='vline'
      markers markerattrs=(color='cxF79646' size=10pt symbol=diamondfilled)
      lineattrs=(thickness=0)
   ;
   yaxis label="Per Member Per Year Spend" ;
   y2axis label= 'Trend%' ;
run; &lt;/PRE&gt;
&lt;P&gt;There are additional text options, axis options and attrmap dataset that may help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 22:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348327#M12098</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-07T22:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs (Annotation Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348338#M12100</link>
      <description>&lt;P&gt;Thanks for the reply. I have Javav error's. i will have to check with my system admin. If possible can you please attach the output. i am just curious to see how the output looks. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: The Java proxy is not responding.&lt;BR /&gt;ERROR: Unable to load the Java Virtual Machine. Please see the installation&lt;BR /&gt;instructions or system administrator.&lt;BR /&gt;ERROR: Unable to load the Java Virtual Machine. Please see the installation&lt;BR /&gt;instructions or system administrator.&lt;BR /&gt;ERROR: The Java child process terminated unexpectedly: status 255.&lt;BR /&gt;ERROR: WIFSIGNALED 0 WIFEXITED 0 WEXITSTATUS -1 WTERMSIG -1.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 6 observations read from the data set WORK.MY_DATA1.&lt;BR /&gt;NOTE: Remote submit to ATLAS complete.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2017 00:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348338#M12100</guid>
      <dc:creator>pmksasbi</dc:creator>
      <dc:date>2017-04-08T00:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs (Annotation Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348914#M12125</link>
      <description>&lt;P&gt;&lt;IMG title="SGPlot.png" alt="SGPlot.png" src="https://communities.sas.com/t5/image/serverpage/image-id/8253i646B8773D43D26B6/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't use many options.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 22:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/348914#M12125</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-10T22:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs (Annotation Proc Gbarline)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/350103#M12138</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 17:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs-Annotation-Proc-Gbarline/m-p/350103#M12138</guid>
      <dc:creator>pmksasbi</dc:creator>
      <dc:date>2017-04-14T17:34:14Z</dc:date>
    </item>
  </channel>
</rss>

