<?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: Bar chart with sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371624#M12844</link>
    <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2017 11:42:27 GMT</pubDate>
    <dc:creator>PSIOT</dc:creator>
    <dc:date>2017-06-29T11:42:27Z</dc:date>
    <item>
      <title>Bar chart with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371567#M12838</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I would like to change the labels of each bar but keeping same order of procedure.&lt;/P&gt;&lt;P&gt;Please find my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=toto noborder;&lt;BR /&gt;styleattrs datacolors=(Firebrick big vpap deepskyblue ) ;&lt;BR /&gt;vbar patient / response=time /*stat=sum*/&lt;BR /&gt;group=procedure fil barwidth=0.2 seglabel seglabelattrs=(color=white size=12 ) /*datalabel*/&lt;BR /&gt;baselineattrs=(thickness=0 ) groupdisplay=stack&lt;BR /&gt;outlineattrs=(color=cx3f3f3f);&lt;BR /&gt;keylegend / position=right;&lt;BR /&gt;xaxis display=(nolabel noline noticks);&lt;BR /&gt;yaxis label='Hours' grid;&lt;BR /&gt;title 'Procedure times';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Please find below the graph inside attachments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to replace:&lt;/P&gt;&lt;P&gt;'01:Induction' by 'Induction'&lt;/P&gt;&lt;P&gt;'02:Incis_CPB' by 'Incision to CPB'&lt;/P&gt;&lt;P&gt;'03:CPBDurati' by 'CPB duration'&lt;/P&gt;&lt;P&gt;'04:skin_clos' by CPB stop to skin closure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank all for your support,&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/14003i20D44D2CD8FA1635/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="bar chart.png" title="bar chart.png" /&gt;</description>
      <pubDate>Thu, 29 Jun 2017 08:17:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371567#M12838</guid>
      <dc:creator>PSIOT</dc:creator>
      <dc:date>2017-06-29T08:17:49Z</dc:date>
    </item>
    <item>
      <title>Bar chart with Sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371568#M12840</link>
      <description>&lt;DIV class="lia-message-heading lia-component-message-header"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I would like to change the labels of each bar but keeping same order of procedure.&lt;/P&gt;&lt;P&gt;Please find my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=toto noborder;&lt;BR /&gt;styleattrs datacolors=(Firebrick big vpap deepskyblue ) ;&lt;BR /&gt;vbar patient / response=time /*stat=sum*/&lt;BR /&gt;group=procedure fil barwidth=0.2 seglabel seglabelattrs=(color=white size=12 ) /*datalabel*/&lt;BR /&gt;baselineattrs=(thickness=0 ) groupdisplay=stack&lt;BR /&gt;outlineattrs=(color=cx3f3f3f);&lt;BR /&gt;keylegend / position=right;&lt;BR /&gt;xaxis display=(nolabel noline noticks);&lt;BR /&gt;yaxis label='Hours' grid;&lt;BR /&gt;title 'Procedure times';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Please find below the graph inside attachments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to replace:&lt;/P&gt;&lt;P&gt;'01:Induction' by 'Induction'&lt;/P&gt;&lt;P&gt;'02:Incis_CPB' by 'Incision to CPB'&lt;/P&gt;&lt;P&gt;'03:CPBDurati' by 'CPB duration'&lt;/P&gt;&lt;P&gt;'04:skin_clos' by CPB stop to skin closure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank all for your support,&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/14004iDD26C4697F3052F3/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="bar chart.png" title="bar chart.png" /&gt;</description>
      <pubDate>Thu, 29 Jun 2017 08:19:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371568#M12840</guid>
      <dc:creator>PSIOT</dc:creator>
      <dc:date>2017-06-29T08:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371579#M12841</link>
      <description>&lt;P&gt;The way to do this is to make your categories numeric, i.e. 1 for the first, 2 for the second etc. and apply a format to them with the full text. &amp;nbsp;This way the data orders correctly per the numeric, and displays the full formatted value.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 09:06:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371579#M12841</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-06-29T09:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371589#M12842</link>
      <description>&lt;P&gt;I do not used very often proc format.&lt;/P&gt;&lt;P&gt;I try this code but that does not work:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc format lib=work;&lt;BR /&gt;value $ procedure '01:Induction' = 'Induction'&lt;BR /&gt;'02:Incis_CPB' = 'Incision to CPB'&lt;BR /&gt;'03:CPBDurati' = 'Incision to CPB'&lt;BR /&gt;'04:skin_clos' = 'CPB stop to skin closure';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=toto noborder;&lt;/P&gt;&lt;P&gt;styleattrs datacolors=(Firebrick big vpap deepskyblue ) ;&lt;BR /&gt;vbar patient / response=time /*stat=sum*/&lt;BR /&gt;group=procedure barwidth=0.2 seglabel seglabelattrs=(color=white size=10) /*datalabel*/&lt;BR /&gt;baselineattrs=(thickness=0 ) nooutline /*groupdisplay=stack*/&lt;BR /&gt;outlineattrs=(color=cx3f3f3f);&lt;BR /&gt;Format procedure;&lt;BR /&gt;keylegend / position=right;&lt;BR /&gt;xaxis display=(nolabel noline noticks);&lt;BR /&gt;yaxis label='Hours' grid;&lt;BR /&gt;title 'Procedure times';&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 09:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371589#M12842</guid>
      <dc:creator>PSIOT</dc:creator>
      <dc:date>2017-06-29T09:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371604#M12843</link>
      <description>&lt;P&gt;Its a good idea to indicate "what doesn't work" in future. &amp;nbsp;I guess its because you didn't apply the format:&lt;/P&gt;
&lt;PRE&gt;proc format lib=work;
  value $procedure 
  '01:Induction' = 'Induction'
  '02:Incis_CPB' = 'Incision to CPB'
  '03:CPBDurati' = 'Incision to CPB'
  '04:skin_clos' = 'CPB stop to skin closure';
run;
 
title 'Procedure times';

proc sgplot data=toto noborder;
  styleattrs datacolors=(Firebrick big vpap deepskyblue ) ;
  vbar patient / response=time group=procedure barwidth=0.2 seglabel seglabelattrs=(color=white size=10)
    baselineattrs=(thickness=0 ) nooutline outlineattrs=(color=cx3f3f3f);
  format procedure $procedure.;
  keylegend / position=right;
  xaxis display=(nolabel noline noticks);
  yaxis label='Hours' grid;
run;&lt;/PRE&gt;
&lt;P&gt;Note the format line.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 10:40:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371604#M12843</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-06-29T10:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371624#M12844</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 11:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bar-chart-with-sgplot/m-p/371624#M12844</guid>
      <dc:creator>PSIOT</dc:creator>
      <dc:date>2017-06-29T11:42:27Z</dc:date>
    </item>
  </channel>
</rss>

