<?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: Highlight a certain boxplot background in a group of boxplots and make the graph narrower in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-a-certain-boxplot-background-in-a-group-of-boxplots/m-p/359699#M12533</link>
    <description>&lt;P&gt;It is hard to say what your x-axis range is as you have&amp;nbsp;turned the&amp;nbsp;axis off. &amp;nbsp;If the axis is numeric 1-6, then you could set the values=(1 to 4 by 1). &amp;nbsp;Or, you can reduce the min and max offsets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the highlighting, place a "X" reference line behind the box plot with x value ='Global', and increase the line thickness. &amp;nbsp;Use transparency and color you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.heart;
  refline 'Coronary Heart Disease' / axis=x 
          lineattrs=(thickness=70 color=yellow) transparency=0.5 ;
  vbox cholesterol / category=deathcause;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8949iAB7D4E4A00A89C62/image-size/medium?v=1.0&amp;amp;px=-1" border="0" alt="BoxHighlight.png" title="BoxHighlight.png" /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2017 17:35:44 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2017-05-18T17:35:44Z</dc:date>
    <item>
      <title>Highlight a certain boxplot background in a group of boxplots and make the graph narrower</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-a-certain-boxplot-background-in-a-group-of-boxplots/m-p/359691#M12532</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for a way to tune this PROC SGPLOT produced graph. I don't mind changing to a different procedure while the result remains the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Firstly, and more importantly, I would like to find a way to change the color of a custom background area of the plot in order to highlight a certain boxplot from a group of boxplots (see the attached figure).&lt;/LI&gt;&lt;LI&gt;Secondly, I haven't found a way to control the x axis width when there is no scale on it (as in my boxplot example) because in that case&amp;nbsp;the "xaxis min=0 max=6" statement doesn't make sense (I have shown also in the attached figure what I would like to achieve)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks in advance for all your help and comments!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8945i34F39809401ABEC2/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="sas-boxplot.PNG" title="sas-boxplot.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 15:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-a-certain-boxplot-background-in-a-group-of-boxplots/m-p/359691#M12532</guid>
      <dc:creator>emera86</dc:creator>
      <dc:date>2017-05-18T15:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a certain boxplot background in a group of boxplots and make the graph narrower</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-a-certain-boxplot-background-in-a-group-of-boxplots/m-p/359699#M12533</link>
      <description>&lt;P&gt;It is hard to say what your x-axis range is as you have&amp;nbsp;turned the&amp;nbsp;axis off. &amp;nbsp;If the axis is numeric 1-6, then you could set the values=(1 to 4 by 1). &amp;nbsp;Or, you can reduce the min and max offsets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the highlighting, place a "X" reference line behind the box plot with x value ='Global', and increase the line thickness. &amp;nbsp;Use transparency and color you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.heart;
  refline 'Coronary Heart Disease' / axis=x 
          lineattrs=(thickness=70 color=yellow) transparency=0.5 ;
  vbox cholesterol / category=deathcause;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8949iAB7D4E4A00A89C62/image-size/medium?v=1.0&amp;amp;px=-1" border="0" alt="BoxHighlight.png" title="BoxHighlight.png" /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 17:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-a-certain-boxplot-background-in-a-group-of-boxplots/m-p/359699#M12533</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-05-18T17:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a certain boxplot background in a group of boxplots and make the graph narrower</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-a-certain-boxplot-background-in-a-group-of-boxplots/m-p/359942#M12559</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54&lt;/a&gt;&amp;nbsp;for your help!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The offset attribute wasn't working for me because it just moves the the plot towards one side or another, but you gave me a clue on where to search for a proper solution. I finally solved it changing the THRESHOLDMIN and&amp;nbsp;THRESHOLDMAX values, which control the spacing between the left and right border of the plot respectively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;About the line reference, it totally solved my problem in a very simple way. Thanks for such an ingenious solution!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!!&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 11:44:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-a-certain-boxplot-background-in-a-group-of-boxplots/m-p/359942#M12559</guid>
      <dc:creator>emera86</dc:creator>
      <dc:date>2017-05-19T11:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a certain boxplot background in a group of boxplots and make the graph narrower</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-a-certain-boxplot-background-in-a-group-of-boxplots/m-p/359969#M12562</link>
      <description>&lt;P&gt;You are welcome. &amp;nbsp;For future reference, it is easier to help if you attach your code and some sample data. &amp;nbsp;Then we can see what you are getting and how to help. &amp;nbsp;Version of SAS also helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The RefLine thickness will impact the offsets. &amp;nbsp;You can set the offsetmin and offsetmax to control the white space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8963iDDE6FD614DF91788/image-size/medium?v=1.0&amp;amp;px=-1" border="0" alt="BoxHighlight.png" title="BoxHighlight.png" /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.heart;
  refline 'Coronary Heart Disease' / axis=x 
          lineattrs=(thickness=70 color=yellow) transparency=0.5 ;
  vbox cholesterol / category=deathcause;
  &lt;STRONG&gt;yaxis offsetmin=0.05 offsetmax=0.05;&lt;/STRONG&gt;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 13:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-a-certain-boxplot-background-in-a-group-of-boxplots/m-p/359969#M12562</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-05-19T13:55:18Z</dc:date>
    </item>
  </channel>
</rss>

