<?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: how to create sas graph with 2 response variables? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-sas-graph-with-2-response-variables/m-p/857232#M338712</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data main_subset;
infile cards expandtabs truncover;
input sam : $20. rrc	frc	rep $;
cards;
MES_TreatA	229	1641852	R1
MES_TreatA	258	1152647	R2
MES_TreatB	187	929301	R1
MES_TreatB	530	2556723	R2
MES_TreatC	482255	574857	R1
MES_TreatC	534623	728475	R2
MES_TreatD	1015145	599958	R1
MES_TreatD	1987144	244161	R2
MES_TreatE	564	1838329	R1
MES_TreatE	209	2189893	R2
;
data main_subset2;
 set main_subset;
 sam=catx('_',sam,rep);
 id='rrc';value=rrc;output;
 id='frc';value=frc;output;
 keep sam id value;
run;

proc sgplot data=main_subset2;
vbar sam / response =  value group=id  grouporder=descending nooutline;
  xaxis display=(nolabel noticks) discreteorder=data VALUESROTATE=DIAGONAL2
FITPOLICY=ROTATE valuesformat=$10.;
  yaxis label="reads" grid ;
  keylegend /title='' noborder autooutline;
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-1675592031423.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80110i956125F278EBB068/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1675592031423.png" alt="Ksharp_0-1675592031423.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 05 Feb 2023 10:15:01 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2023-02-05T10:15:01Z</dc:date>
    <item>
      <title>how to create sas graph with 2 response variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-sas-graph-with-2-response-variables/m-p/857211#M338702</link>
      <description>&lt;P&gt;I want to replicate this excel graph in SAS to reuse in macro. I want to use both rrc and frc as responses to the stack&lt;/P&gt;
&lt;P&gt;proc sgplot data=main_subset;&lt;/P&gt;
&lt;P&gt;vbar sam / response =&amp;nbsp; rrc&amp;nbsp; group=rep groupdisplay = cluster seglabel datalabel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;stat=mean dataskin=gloss;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; xaxis display=(nolabel noticks) discreteorder=data FITPOLICY=STAGGERROTATE;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; yaxis label="reads";*grid;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;TABLE width="329"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="137"&gt;sam&lt;/TD&gt;
&lt;TD width="64"&gt;rrc&lt;/TD&gt;
&lt;TD width="64"&gt;frc&lt;/TD&gt;
&lt;TD width="64"&gt;rep&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatA&lt;/TD&gt;
&lt;TD&gt;229&lt;/TD&gt;
&lt;TD&gt;1641852&lt;/TD&gt;
&lt;TD&gt;R1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatA&lt;/TD&gt;
&lt;TD&gt;258&lt;/TD&gt;
&lt;TD&gt;1152647&lt;/TD&gt;
&lt;TD&gt;R2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatB&lt;/TD&gt;
&lt;TD&gt;187&lt;/TD&gt;
&lt;TD&gt;929301&lt;/TD&gt;
&lt;TD&gt;R1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatB&lt;/TD&gt;
&lt;TD&gt;530&lt;/TD&gt;
&lt;TD&gt;2556723&lt;/TD&gt;
&lt;TD&gt;R2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatC&lt;/TD&gt;
&lt;TD&gt;482255&lt;/TD&gt;
&lt;TD&gt;574857&lt;/TD&gt;
&lt;TD&gt;R1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatC&lt;/TD&gt;
&lt;TD&gt;534623&lt;/TD&gt;
&lt;TD&gt;728475&lt;/TD&gt;
&lt;TD&gt;R2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatD&lt;/TD&gt;
&lt;TD&gt;1015145&lt;/TD&gt;
&lt;TD&gt;599958&lt;/TD&gt;
&lt;TD&gt;R1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatD&lt;/TD&gt;
&lt;TD&gt;1987144&lt;/TD&gt;
&lt;TD&gt;244161&lt;/TD&gt;
&lt;TD&gt;R2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatE&lt;/TD&gt;
&lt;TD&gt;564&lt;/TD&gt;
&lt;TD&gt;1838329&lt;/TD&gt;
&lt;TD&gt;R1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;MES_TreatE&lt;/TD&gt;
&lt;TD&gt;209&lt;/TD&gt;
&lt;TD&gt;2189893&lt;/TD&gt;
&lt;TD&gt;R2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stalk_0-1675558780354.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80106iA29CDF7DC3ACE372/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Stalk_0-1675558780354.png" alt="Stalk_0-1675558780354.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 01:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-sas-graph-with-2-response-variables/m-p/857211#M338702</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2023-02-05T01:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to create sas graph with 2 response variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-sas-graph-with-2-response-variables/m-p/857230#M338711</link>
      <description>Why you have two the same "MES_TreatA" in the picture ?</description>
      <pubDate>Sun, 05 Feb 2023 09:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-sas-graph-with-2-response-variables/m-p/857230#M338711</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-05T09:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to create sas graph with 2 response variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-sas-graph-with-2-response-variables/m-p/857232#M338712</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data main_subset;
infile cards expandtabs truncover;
input sam : $20. rrc	frc	rep $;
cards;
MES_TreatA	229	1641852	R1
MES_TreatA	258	1152647	R2
MES_TreatB	187	929301	R1
MES_TreatB	530	2556723	R2
MES_TreatC	482255	574857	R1
MES_TreatC	534623	728475	R2
MES_TreatD	1015145	599958	R1
MES_TreatD	1987144	244161	R2
MES_TreatE	564	1838329	R1
MES_TreatE	209	2189893	R2
;
data main_subset2;
 set main_subset;
 sam=catx('_',sam,rep);
 id='rrc';value=rrc;output;
 id='frc';value=frc;output;
 keep sam id value;
run;

proc sgplot data=main_subset2;
vbar sam / response =  value group=id  grouporder=descending nooutline;
  xaxis display=(nolabel noticks) discreteorder=data VALUESROTATE=DIAGONAL2
FITPOLICY=ROTATE valuesformat=$10.;
  yaxis label="reads" grid ;
  keylegend /title='' noborder autooutline;
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-1675592031423.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80110i956125F278EBB068/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1675592031423.png" alt="Ksharp_0-1675592031423.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 10:15:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-sas-graph-with-2-response-variables/m-p/857232#M338712</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-05T10:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to create sas graph with 2 response variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-create-sas-graph-with-2-response-variables/m-p/857437#M338808</link>
      <description>&lt;P&gt;Thank you so much. It worked very well.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:35:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-create-sas-graph-with-2-response-variables/m-p/857437#M338808</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2023-02-06T20:35:58Z</dc:date>
    </item>
  </channel>
</rss>

