<?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: Different patterns for GROUP in SGPLOT VBOX in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932655#M24712</link>
    <description>&lt;P&gt;Fill patterns are sort of out of style. SAS supports some line styles, left right and cross with different weight lines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=sashelp.class;
     styleattrs datafillpatterns=( L1 X2);
     vbox height /group=sex   fillpattern nofill;
     ;
run;&lt;/PRE&gt;
&lt;P&gt;The styleattrs sets the first fill to a left slanting light weight line and the second to across slightly heavier lines.&lt;/P&gt;
&lt;P&gt;Fill pattern in the plot says to use them and the NOFILL removes the background color.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2024 14:49:32 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-06-17T14:49:32Z</dc:date>
    <item>
      <title>Different patterns for GROUP in SGPLOT VBOX</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932645#M24711</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this syntax:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data=plot ;
   vbox value /  category=DV group=genre ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;SGPLOT produces a VBOX with different colors for the two groups defined in GROUP=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See graphs below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead, I would like the two levels of groups (liteary and popular) to have different patterns (for instance, small dots for one and small x for the other).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been looking into various options with&amp;nbsp;ATTRMAP, but I do not seem to be able to get it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Suggestions?&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="Screenshot 2024-06-17 at 16.32.29.png" style="width: 380px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97507i19B254FE63E2C827/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-06-17 at 16.32.29.png" alt="Screenshot 2024-06-17 at 16.32.29.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 14:35:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932645#M24711</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2024-06-17T14:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Different patterns for GROUP in SGPLOT VBOX</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932655#M24712</link>
      <description>&lt;P&gt;Fill patterns are sort of out of style. SAS supports some line styles, left right and cross with different weight lines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=sashelp.class;
     styleattrs datafillpatterns=( L1 X2);
     vbox height /group=sex   fillpattern nofill;
     ;
run;&lt;/PRE&gt;
&lt;P&gt;The styleattrs sets the first fill to a left slanting light weight line and the second to across slightly heavier lines.&lt;/P&gt;
&lt;P&gt;Fill pattern in the plot says to use them and the NOFILL removes the background color.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 14:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932655#M24712</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-06-17T14:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Different patterns for GROUP in SGPLOT VBOX</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932660#M24713</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;thanks, but it does not seem to be working. See the adapted syntax and result below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data=plot  ;
     styleattrs datafillpatterns=( L1 X2);
   vbox value /  category=DV group=genre fillpattern nofill;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Produces this result:&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="Screenshot 2024-06-17 at 17.01.47.png" style="width: 675px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97515i26101511D6B010D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-06-17 at 17.01.47.png" alt="Screenshot 2024-06-17 at 17.01.47.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 15:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932660#M24713</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2024-06-17T15:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Different patterns for GROUP in SGPLOT VBOX</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932667#M24714</link>
      <description>&lt;P&gt;I think you are saying that you want the symbols for the markers to be different for the different groups? If so, consider using ATTRPRIORITY=NONE&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / attrpriority=none;

proc sgplot data=sashelp.cars(where=(origin^="USA"));
     vbox mpg_city /group=origin;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For more on this topic, see &lt;A href="https://blogs.sas.com/content/iml/2018/06/13/attrpriority-cycleattrs-styleattrs-ods-graphics.html" target="_self"&gt;"The interaction between ATTRPRIORITY, CYCLEATTRS, and STYLEATTRS in ODS graphics,"&lt;/A&gt; which describes all the ways that you can get the group attributes to vary.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 15:22:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932667#M24714</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-06-17T15:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Different patterns for GROUP in SGPLOT VBOX</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932680#M24715</link>
      <description>&lt;P&gt;How about&amp;nbsp;Discrete Attribute Map Data Sets ?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data plot;
  do DV='Legal BERT', 'BERT';
    do genre = "literary", "popular";
      k+1;
      do i = 1 to 64+k;
        value = rannor(42)+k;
        output;
      end; 
    end;
  end;
run;

data DiscreteAttributeMapDS;
length linecolor $ 9 fillcolor $ 9 markersymbol markercolor $ 20;
input ID $ value $ linecolor $ fillcolor $ markersymbol $ markercolor $;
datalines;
MYID  literary red pink CircleFilled gold
MYID  popular blue lightblue Star green
;
run;

proc sgplot data=plot DATTRMAP=DiscreteAttributeMapDS;
   vbox value /  category=DV group=genre ATTRID=MYID;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yabwon_0-1718638255710.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/97525iC667D3D6F4E1980B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yabwon_0-1718638255710.png" alt="yabwon_0-1718638255710.png" /&gt;&lt;/span&gt;&lt;/P&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;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 15:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932680#M24715</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-06-17T15:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Different patterns for GROUP in SGPLOT VBOX</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932681#M24716</link>
      <description>&lt;P&gt;hello Rick,&lt;/P&gt;&lt;P&gt;yes, that worked!&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;E&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 15:32:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-patterns-for-GROUP-in-SGPLOT-VBOX/m-p/932681#M24716</guid>
      <dc:creator>emaneman</dc:creator>
      <dc:date>2024-06-17T15:32:25Z</dc:date>
    </item>
  </channel>
</rss>

