<?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 Displaying Multiple Box Plots with Different Ranges in a same figure in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Displaying-Multiple-Box-Plots-with-Different-Ranges-in-a-same/m-p/955360#M47771</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have three variables (columns), and I was asked to create box plots for all three variables in the same figure. I used the below code, but due to the large differences in the ranges of these three variables, the box plots for var1 and var3 are not clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data long;
    set have;
    Variable = "Var1"; Value = Var1; output;
    Variable = "Var2"; Value = Var2; output;
    Variable = "Var3"; Value = Var3; output;
    drop Var1 Var2 Var3;
run;
proc sgplot data=long noborder;
    vbox Value / category=Variable;
run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhrq_0-1736275642770.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103526i2BE52AF3FE7A7002/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bhrq_0-1736275642770.png" alt="bhrq_0-1736275642770.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Could you please help me how to fix that?&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jan 2025 18:53:52 GMT</pubDate>
    <dc:creator>bhr-q</dc:creator>
    <dc:date>2025-01-07T18:53:52Z</dc:date>
    <item>
      <title>Displaying Multiple Box Plots with Different Ranges in a same figure</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Displaying-Multiple-Box-Plots-with-Different-Ranges-in-a-same/m-p/955360#M47771</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have three variables (columns), and I was asked to create box plots for all three variables in the same figure. I used the below code, but due to the large differences in the ranges of these three variables, the box plots for var1 and var3 are not clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data long;
    set have;
    Variable = "Var1"; Value = Var1; output;
    Variable = "Var2"; Value = Var2; output;
    Variable = "Var3"; Value = Var3; output;
    drop Var1 Var2 Var3;
run;
proc sgplot data=long noborder;
    vbox Value / category=Variable;
run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhrq_0-1736275642770.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103526i2BE52AF3FE7A7002/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bhrq_0-1736275642770.png" alt="bhrq_0-1736275642770.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Could you please help me how to fix that?&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 18:53:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Displaying-Multiple-Box-Plots-with-Different-Ranges-in-a-same/m-p/955360#M47771</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2025-01-07T18:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Multiple Box Plots with Different Ranges in a same figure</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Displaying-Multiple-Box-Plots-with-Different-Ranges-in-a-same/m-p/955377#M47772</link>
      <description>&lt;P&gt;In general the solution to having disparate scales is to change the scale of the Y axis. One was to do this is to use a logarithmic scale. This will fail if some of the data values are actually zero — and I also don't know if it will work for VBOX because I never tried it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are many options in PROC SGPLOT for creating logarithmic scales. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=long noborder;
    vbox Value / category=Variable;
    yaxis type=log logbase=10 logstyle=logexpand;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 19:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Displaying-Multiple-Box-Plots-with-Different-Ranges-in-a-same/m-p/955377#M47772</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-01-07T19:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Multiple Box Plots with Different Ranges in a same figure</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Displaying-Multiple-Box-Plots-with-Different-Ranges-in-a-same/m-p/955442#M47773</link>
      <description>&lt;P&gt;You can suppress to print these outliers to make your graphic look better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=sashelp.heart;
vbox weight/category=bp_Status &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;nooutliers;&lt;/STRONG&gt;&lt;/FONT&gt;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jan 2025 01:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Displaying-Multiple-Box-Plots-with-Different-Ranges-in-a-same/m-p/955442#M47773</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-01-08T01:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Multiple Box Plots with Different Ranges in a same figure</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Displaying-Multiple-Box-Plots-with-Different-Ranges-in-a-same/m-p/955468#M47774</link>
      <description>&lt;P&gt;You could use proc SGPANEL and have the the box plots as rows. See this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data long;
  set sashelp.cars;
  length variable $ 32;
  Variable = "msrp"; Value = msrp; output;
  Variable = "horsepower"; Value = horsepower; output;
  Variable = "mpg_city"; Value = mpg_city; output;
  keep variable value;
run;

proc sgpanel data=long ;
  panelby variable / uniscale=column columns=1 ;
  vbox value;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which will create this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrunoMueller_0-1736335202372.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103577iFAF5B80B8E233522/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrunoMueller_0-1736335202372.png" alt="BrunoMueller_0-1736335202372.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 11:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Displaying-Multiple-Box-Plots-with-Different-Ranges-in-a-same/m-p/955468#M47774</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2025-01-08T11:19:45Z</dc:date>
    </item>
  </channel>
</rss>

