<?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 Options in SG panel in Text statement in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792069#M22521</link>
    <description>&lt;P&gt;Hello Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to display 'Number of subjects'(nsubjs) in legend level with each grade&amp;nbsp; but iam trying to work on the below code in text statement but none of the option is working. Will be there any solution to display subjects in legend with each grade by removing subjects on top of the bar. For reference i am attaching figure and code. Please provide your insights which would help me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA:&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="Capture12.PNG" style="width: 867px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67763iF9F8DB88597464E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture12.PNG" alt="Capture12.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Figure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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="Capture13.PNG" style="width: 877px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67764i1FD0B60493F33664/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture13.PNG" alt="Capture13.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgpanel data=final dattrmap=attrmap ;&lt;BR /&gt;by rowlbl;&lt;BR /&gt;panelby tptn / layout=columnlattice onepanel noborder novarname colheaderpos=bottom headerattrs=(size=7.5) spacing=10;&lt;BR /&gt;format tptn tptf.; &lt;BR /&gt;vbarparm category=trtn response=percent/ group=grade displaybaseline=auto;&lt;BR /&gt;text x=trtn y=percent text=nsubjs / position=left pad=(bottom=25px) contributeoffsets=none ;&lt;BR /&gt;format trtn trt2f.;&lt;BR /&gt;colaxistable nsubjs ;&lt;BR /&gt;rowaxis values=(0 to 100 by 10) label='Percentage of Subjects with Reactions' ;&lt;BR /&gt;keylegend /exclude = ("PERCENT") border; &lt;BR /&gt;&lt;BR /&gt;run;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want the figure to be displayed as below figure image highlighted in yellow:&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="Capture15.PNG" style="width: 753px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67766i4F49BDA897C51903/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture15.PNG" alt="Capture15.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jan 2022 14:45:41 GMT</pubDate>
    <dc:creator>mounikag</dc:creator>
    <dc:date>2022-01-25T14:45:41Z</dc:date>
    <item>
      <title>Options in SG panel in Text statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792069#M22521</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to display 'Number of subjects'(nsubjs) in legend level with each grade&amp;nbsp; but iam trying to work on the below code in text statement but none of the option is working. Will be there any solution to display subjects in legend with each grade by removing subjects on top of the bar. For reference i am attaching figure and code. Please provide your insights which would help me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA:&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="Capture12.PNG" style="width: 867px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67763iF9F8DB88597464E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture12.PNG" alt="Capture12.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Figure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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="Capture13.PNG" style="width: 877px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67764i1FD0B60493F33664/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture13.PNG" alt="Capture13.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgpanel data=final dattrmap=attrmap ;&lt;BR /&gt;by rowlbl;&lt;BR /&gt;panelby tptn / layout=columnlattice onepanel noborder novarname colheaderpos=bottom headerattrs=(size=7.5) spacing=10;&lt;BR /&gt;format tptn tptf.; &lt;BR /&gt;vbarparm category=trtn response=percent/ group=grade displaybaseline=auto;&lt;BR /&gt;text x=trtn y=percent text=nsubjs / position=left pad=(bottom=25px) contributeoffsets=none ;&lt;BR /&gt;format trtn trt2f.;&lt;BR /&gt;colaxistable nsubjs ;&lt;BR /&gt;rowaxis values=(0 to 100 by 10) label='Percentage of Subjects with Reactions' ;&lt;BR /&gt;keylegend /exclude = ("PERCENT") border; &lt;BR /&gt;&lt;BR /&gt;run;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want the figure to be displayed as below figure image highlighted in yellow:&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="Capture15.PNG" style="width: 753px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67766i4F49BDA897C51903/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture15.PNG" alt="Capture15.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 14:45:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792069#M22521</guid>
      <dc:creator>mounikag</dc:creator>
      <dc:date>2022-01-25T14:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Options in SG panel in Text statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792167#M22522</link>
      <description>&lt;P&gt;I think that perhaps you want an COLAXISTABLE statement. Without data can't make specific code suggestions though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might be as simple as replacing your Text statement with&lt;/P&gt;
&lt;PRE&gt;Colaxistable nsubjs;&lt;/PRE&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 13:02:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792167#M22522</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-25T13:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Options in SG panel in Text statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792189#M22523</link>
      <description>Hi Ballardw,&lt;BR /&gt;&lt;BR /&gt;Thanks for quick response. I tried using colaxistable but it didnt worked it still displaying inside the figure not on the legend level(not on the bottom of x-axis).The code and data and  new figure by using colaxistable displaying in original question by editing. i cannot post the picture of code, data and figure in the reply&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jan 2022 14:36:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792189#M22523</guid>
      <dc:creator>mounikag</dc:creator>
      <dc:date>2022-01-25T14:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Options in SG panel in Text statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792197#M22524</link>
      <description>&lt;P&gt;The XAXISTABLEs and YAXISTABLEs in the SGPLOT procedure can be either inside or outside of the data area; but the equivalent ROWAXISTABLEs and COLAXISTABLEs in the SGPANEL procedure can only be in the inside, since classification panels can have multiple rows and columns. If you absolutely want external axis tables, one approach you could take would be to use SGPLOT with a BY-group, use the UNIFORM option to create uniform axes and groups, and use ODS LAYOUT to lay them out in a panel fashion. If you are interested in that approach and need more information, let me know.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 15:16:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792197#M22524</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2022-01-25T15:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Options in SG panel in Text statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792220#M22525</link>
      <description>Thanks DanH_sas for detail explanation. I want  more information  in the above approach by using sgplot with uniform option . could you please provide an example with data so  it would be helpful</description>
      <pubDate>Tue, 25 Jan 2022 16:18:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792220#M22525</guid>
      <dc:creator>mounikag</dc:creator>
      <dc:date>2022-01-25T16:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Options in SG panel in Text statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792223#M22526</link>
      <description>&lt;P&gt;Here is a little example comparable to your scenario:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;
ods html path="." file="sales.html";
ods layout gridded advance=bygroup columns=2;

proc sort data=sashelp.prdsale out=sales; by quarter; run;

ods layout start;
proc sgplot data=sales uniform=all;
by quarter;
vbar product / response=actual group=region;
xaxistable actual / class=region location=outside;
run;
ods layout end;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Jan 2022 16:42:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792223#M22526</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2022-01-25T16:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Options in SG panel in Text statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792247#M22527</link>
      <description>&lt;P&gt;Hi Danh_sas,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much it worked. I need a small update i want to display 'severe' grade as highlighted in yellow in a key legend even though if it is not in data. Is there any way to display by using any options:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture16.PNG" style="width: 714px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67780i213DE2B6726B5C52/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture16.PNG" alt="Capture16.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or i should a create a dummy dataset to insert 'severe'&amp;nbsp; column into data to represent in graph? please provide your insights&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 18:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792247#M22527</guid>
      <dc:creator>mounikag</dc:creator>
      <dc:date>2022-01-25T18:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Options in SG panel in Text statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792287#M22528</link>
      <description>&lt;P&gt;The best way for you to do that is to use a Discrete Attributes Map, with a SHOW value of ATTRMAP. This option tells the procedure to let the attrmap dictate the content of the grouped legend instead of the group column in the data. If you've never used an attrmap, notice the DATTRMAP option on the procedure statement and the ATTRID on the VBAR statement to bind the plot to the correct attrmap. I also removed the CLASS option from the XAXISTABLE, which was not needed here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;
ods html path="." file="sales.html";
ods layout gridded advance=bygroup columns=2;

data attrmap;
retain id "myid" show "attrmap";
length value $ 5 fillstyleelement $ 10;
input value $ fillstyleelement $;
cards;
East  GraphData1
West  GraphData2
North GraphData3
South GraphData4
;
run;

proc sort data=sashelp.prdsale out=sales; by quarter; run;

ods layout start;
proc sgplot data=sales uniform=all dattrmap=attrmap;
by quarter;
vbar product / response=actual group=region attrid=myid;
xaxistable actual / location=outside;
run;

ods layout end;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 19:41:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792287#M22528</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2022-01-25T19:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Options in SG panel in Text statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792364#M22530</link>
      <description>Thanks  Danh_sas for quick reply and it worked.</description>
      <pubDate>Wed, 26 Jan 2022 05:55:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Options-in-SG-panel-in-Text-statement/m-p/792364#M22530</guid>
      <dc:creator>mounikag</dc:creator>
      <dc:date>2022-01-26T05:55:53Z</dc:date>
    </item>
  </channel>
</rss>

