<?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: SG Plot Specific VBAR anotation add text top of the bar in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SG-Plot-Specific-VBAR-anotation-add-text-top-of-the-bar/m-p/793265#M22546</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics /attrpriority=none;
proc sgplot data=sashelp.heart;
	   styleattrs  datafillpatterns=(r1 r3 x1 l3)
	   datacontrastcolors=(white black black black);	   
	   vbar Smoking_Status / response=weight group=bp_status grouporder=data groupdisplay=stack fillattrs=(color="white") 
	   				   outlineattrs=(color="black") fillpattern;
	   keylegend / position=bottom title="Bottom TItle 1";
	   yaxis grid label="Number of tiles";
	   xaxis display=(nolabel) discreteorder=data valueattrs=(size=7);
	   
refline 'Non-smoker' /axis=x  transparency=1 label='Mar20*' labelpos=max labelattrs=(color=red weight=bold);
	run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1643436263873.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67969i35EAD3A86F5F383E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1643436263873.png" alt="Ksharp_0-1643436263873.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 29 Jan 2022 06:04:33 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-01-29T06:04:33Z</dc:date>
    <item>
      <title>SG Plot Specific VBAR anotation add text top of the bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SG-Plot-Specific-VBAR-anotation-add-text-top-of-the-bar/m-p/793159#M22544</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to add text/special (Mar20*) charcters in the one of the selected bar as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data=indata;
	   styleattrs 
	   datafillpatterns=(r1 r3 x1 l3)
	   datacontrastcolors=(white black black black);
	   symbolchar
	   
	   vbar group1 / response=COL1 group=group2 grouporder=data groupdisplay=stack fillattrs=(color="white") 
	   				   outlineattrs=(color="black") fillpattern;
	   keylegend / position=bottom title="Bottom TItle 1";
	   yaxis grid label="Number of tiles";
	   xaxis display=(nolabel) discreteorder=data valueattrs=(size=7);   
	run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rajasekhar&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 00:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SG-Plot-Specific-VBAR-anotation-add-text-top-of-the-bar/m-p/793159#M22544</guid>
      <dc:creator>raja777pharma</dc:creator>
      <dc:date>2022-01-31T00:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: SG Plot Specific VBAR anotation add text top of the bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SG-Plot-Specific-VBAR-anotation-add-text-top-of-the-bar/m-p/793165#M22545</link>
      <description>&lt;P&gt;Provide a variable with the value associated with the xaxis variable&lt;/P&gt;
&lt;P&gt;In the VBAR statement:&lt;/P&gt;
&lt;P&gt;Use DATALABEL= the variable name you create for that text&lt;/P&gt;
&lt;P&gt;Use DATALABELATTRS to set attributes for the text&lt;/P&gt;
&lt;P&gt;Use DATALABELPOS=Top to place the text at the top of the bar. You may want to control the Y Axis to allow space inside the graph for this.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 16:50:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SG-Plot-Specific-VBAR-anotation-add-text-top-of-the-bar/m-p/793165#M22545</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-28T16:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: SG Plot Specific VBAR anotation add text top of the bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SG-Plot-Specific-VBAR-anotation-add-text-top-of-the-bar/m-p/793265#M22546</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics /attrpriority=none;
proc sgplot data=sashelp.heart;
	   styleattrs  datafillpatterns=(r1 r3 x1 l3)
	   datacontrastcolors=(white black black black);	   
	   vbar Smoking_Status / response=weight group=bp_status grouporder=data groupdisplay=stack fillattrs=(color="white") 
	   				   outlineattrs=(color="black") fillpattern;
	   keylegend / position=bottom title="Bottom TItle 1";
	   yaxis grid label="Number of tiles";
	   xaxis display=(nolabel) discreteorder=data valueattrs=(size=7);
	   
refline 'Non-smoker' /axis=x  transparency=1 label='Mar20*' labelpos=max labelattrs=(color=red weight=bold);
	run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1643436263873.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67969i35EAD3A86F5F383E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1643436263873.png" alt="Ksharp_0-1643436263873.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 06:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SG-Plot-Specific-VBAR-anotation-add-text-top-of-the-bar/m-p/793265#M22546</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-01-29T06:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: SG Plot Specific VBAR anotation add text top of the bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SG-Plot-Specific-VBAR-anotation-add-text-top-of-the-bar/m-p/793295#M22547</link>
      <description>&lt;P&gt;Here's how to do it with annotate ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data indata; set sashelp.stocks (where=(year(date)=2005));
run;
proc sort data=indata out=indata; 
by date;
run;

proc sql noprint;
create table my_anno as
select unique date, sum(volume) as total_volume
from indata
group by date;
quit; run;

data my_anno; set my_anno;
length label $100 anchor x1space y1space textweight $50;
layer="front";
function="text"; textcolor="red"; textsize=10; textweight='bold'; anchor='bottom'; 
width=100; widthunit='percent'; 
if date='01apr2005'd then label="April Fools!"; 
x1space='datavalue';
y1space='datavalue'; 
x1=date;
y1=total_volume;
run;

proc sgplot data=indata sganno=my_anno;
vbar date / response=volume group=stock grouporder=data groupdisplay=stack;
keylegend / position=bottom title="Bottom TItle 1";
yaxis grid label="Total Volume of Stock Traded";
xaxis display=(nolabel) discreteorder=data valueattrs=(size=7);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bar_anno.png" style="width: 795px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67974iFFB2B16741789D7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="bar_anno.png" alt="bar_anno.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jan 2022 17:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SG-Plot-Specific-VBAR-anotation-add-text-top-of-the-bar/m-p/793295#M22547</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2022-01-29T17:15:17Z</dc:date>
    </item>
  </channel>
</rss>

