<?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 sgpanel hbox suppress missing categories in a panel in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/sgpanel-hbox-suppress-missing-categories-in-a-panel/m-p/887830#M24033</link>
    <description>&lt;P&gt;I am trying to create a sgpanel of hbox, organized by 4 physician categories, with boxes for each physician specialty.&amp;nbsp; Each specialty belongs to a single category.&amp;nbsp; So specgp="Family Medicine" only belongs to the SpecCat="General."&amp;nbsp; &amp;nbsp;When I try to create this, SAS tries to put all the specialty options in for all the category panels, when the other 3 categories have no data for that specialty.&amp;nbsp; I want to suppress the output in those other panels where there's no data.&lt;/P&gt;&lt;P&gt;Also, the number of specialties varies by category.&amp;nbsp; "General" has 3 specialties while "Internal" has 7.&amp;nbsp; I'd like the height of each panel to adjust depending on how many specialties there are.&amp;nbsp; I'd like a different reference line for each panel.&amp;nbsp; This code puts all 4 reference lines in all 4 panels.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created some test data with 2 categories and 5 specialties to show what I mean.&amp;nbsp; Thanks in advance.&amp;nbsp; I'm using SAS 9.4.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data phystest;
input speccat $ specgp $ out;
datalines;
General Family 0.2
General Family 0.3
General Family 0
General Family -0.2
General Pediatric 0.1
General Pediatric -0.1
General Pediatric -0.2
General Pediatric -0.5
Internal Surgery -0.5
Internal Surgery -0.7
Internal Surgery -0.8
Internal Surgery -0.9
Internal Cardiology 1.2
Internal Cardiology 1.4
Internal Cardiology 1.7
Internal Cardiology 1.3
Internal Radiology 0.7
Internal Radiology 0.5
Internal Radiology 0.2
Internal Radiology 0.9
Internal Radiology 1.7
;
proc sgpanel data=phystest noautolegend;
&amp;nbsp; &amp;nbsp;panelby speccat / rows=2;
&amp;nbsp; &amp;nbsp;refline 0.25 -0.25 / axis=x label lineattrs=(color=GREEN);
&amp;nbsp; &amp;nbsp;hbox out / category=specgp ;
&amp;nbsp; &amp;nbsp;colaxis grid minor minorcount=4&amp;nbsp;
&amp;nbsp; &amp;nbsp;min=-1 max=2 gridattrs=(color=LIGR);
&amp;nbsp; &amp;nbsp;label speccat="Category" specgp="Specialty";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2023 05:50:12 GMT</pubDate>
    <dc:creator>David17</dc:creator>
    <dc:date>2023-08-04T05:50:12Z</dc:date>
    <item>
      <title>sgpanel hbox suppress missing categories in a panel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgpanel-hbox-suppress-missing-categories-in-a-panel/m-p/887830#M24033</link>
      <description>&lt;P&gt;I am trying to create a sgpanel of hbox, organized by 4 physician categories, with boxes for each physician specialty.&amp;nbsp; Each specialty belongs to a single category.&amp;nbsp; So specgp="Family Medicine" only belongs to the SpecCat="General."&amp;nbsp; &amp;nbsp;When I try to create this, SAS tries to put all the specialty options in for all the category panels, when the other 3 categories have no data for that specialty.&amp;nbsp; I want to suppress the output in those other panels where there's no data.&lt;/P&gt;&lt;P&gt;Also, the number of specialties varies by category.&amp;nbsp; "General" has 3 specialties while "Internal" has 7.&amp;nbsp; I'd like the height of each panel to adjust depending on how many specialties there are.&amp;nbsp; I'd like a different reference line for each panel.&amp;nbsp; This code puts all 4 reference lines in all 4 panels.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created some test data with 2 categories and 5 specialties to show what I mean.&amp;nbsp; Thanks in advance.&amp;nbsp; I'm using SAS 9.4.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data phystest;
input speccat $ specgp $ out;
datalines;
General Family 0.2
General Family 0.3
General Family 0
General Family -0.2
General Pediatric 0.1
General Pediatric -0.1
General Pediatric -0.2
General Pediatric -0.5
Internal Surgery -0.5
Internal Surgery -0.7
Internal Surgery -0.8
Internal Surgery -0.9
Internal Cardiology 1.2
Internal Cardiology 1.4
Internal Cardiology 1.7
Internal Cardiology 1.3
Internal Radiology 0.7
Internal Radiology 0.5
Internal Radiology 0.2
Internal Radiology 0.9
Internal Radiology 1.7
;
proc sgpanel data=phystest noautolegend;
&amp;nbsp; &amp;nbsp;panelby speccat / rows=2;
&amp;nbsp; &amp;nbsp;refline 0.25 -0.25 / axis=x label lineattrs=(color=GREEN);
&amp;nbsp; &amp;nbsp;hbox out / category=specgp ;
&amp;nbsp; &amp;nbsp;colaxis grid minor minorcount=4&amp;nbsp;
&amp;nbsp; &amp;nbsp;min=-1 max=2 gridattrs=(color=LIGR);
&amp;nbsp; &amp;nbsp;label speccat="Category" specgp="Specialty";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 05:50:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgpanel-hbox-suppress-missing-categories-in-a-panel/m-p/887830#M24033</guid>
      <dc:creator>David17</dc:creator>
      <dc:date>2023-08-04T05:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: sgpanel hbox suppress missing categories in a panel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgpanel-hbox-suppress-missing-categories-in-a-panel/m-p/887844#M24034</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
That is not an easy task.
Here is an example.
*/
data phystest;
infile datalines truncover;
input speccat $ specgp $ out ref ;
datalines;
General Family 0.2  0.25
General Family 0.3
General Family 0
General Family -0.2
General Pediatric 0.1
General Pediatric -0.1
General Pediatric -0.2
General Pediatric -0.5
Internal Surgery -0.5  -0.25
Internal Surgery -0.7
Internal Surgery -0.8
Internal Surgery -0.9
Internal Cardiology 1.2
Internal Cardiology 1.4
Internal Cardiology 1.7
Internal Cardiology 1.3
Internal Radiology 0.7
Internal Radiology 0.5
Internal Radiology 0.2
Internal Radiology 0.9
Internal Radiology 1.7
;

proc sgpanel data=phystest  noautolegend ;
   panelby speccat / rows=2 uniscale=column PROPORTIONAL nowall;
   hbox out / category=specgp ;
   colaxis grid minor minorcount=4 
   min=-1 max=2 gridattrs=(color=LIGR);
   label speccat="Category" specgp="Specialty";
   refline ref/axis=x lineattrs=(color=green) label;
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-1691149658328.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/86435iD197A7C4548D17D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1691149658328.png" alt="Ksharp_0-1691149658328.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 11:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgpanel-hbox-suppress-missing-categories-in-a-panel/m-p/887844#M24034</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-08-04T11:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: sgpanel hbox suppress missing categories in a panel</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgpanel-hbox-suppress-missing-categories-in-a-panel/m-p/887899#M24035</link>
      <description>Thanks!</description>
      <pubDate>Fri, 04 Aug 2023 15:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgpanel-hbox-suppress-missing-categories-in-a-panel/m-p/887899#M24035</guid>
      <dc:creator>David17</dc:creator>
      <dc:date>2023-08-04T15:18:01Z</dc:date>
    </item>
  </channel>
</rss>

