<?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: clustered bar graph with patterns in grey scale in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482439#M16645</link>
    <description>Hi Robert,&lt;BR /&gt;&lt;BR /&gt;I have attached a zip file with an example how the output should like. Please let me know if you are able to open the file, if not I will post the attachment again. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks much for your help!!</description>
    <pubDate>Mon, 30 Jul 2018 12:14:03 GMT</pubDate>
    <dc:creator>sasuerrr</dc:creator>
    <dc:date>2018-07-30T12:14:03Z</dc:date>
    <item>
      <title>clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482329#M16640</link>
      <description>&lt;P&gt;I am trying to create clustered bar graph in grey scale using patterns. I realize under&amp;nbsp;&lt;SPAN&gt;FILLPATTERATTRS SAS has a restriction and only supports&amp;nbsp;JOURNAL2, JOURNAL3, and MONOCHROMEPRINTER which I am using. However, I am unable to change the patterns to distinguish each bar in the cluster. Also, in the x-axis how can I create following tick values for each of the cluster. For example first cluster tick value should display&amp;nbsp;&amp;nbsp;&amp;gt;0 to &amp;lt;10, and next cluster&amp;nbsp;should display &amp;gt;11 to &amp;lt;20 and so on. Attached zip file, any suggestion would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 01:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482329#M16640</guid>
      <dc:creator>sasuerrr</dc:creator>
      <dc:date>2018-07-30T01:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482428#M16643</link>
      <description>&lt;P&gt;Do you have an example of what you would like the graph to look like?&lt;/P&gt;
&lt;P&gt;And maybe a description of your data (what variable names does it have, etc)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 11:41:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482428#M16643</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2018-07-30T11:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482439#M16645</link>
      <description>Hi Robert,&lt;BR /&gt;&lt;BR /&gt;I have attached a zip file with an example how the output should like. Please let me know if you are able to open the file, if not I will post the attachment again. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks much for your help!!</description>
      <pubDate>Mon, 30 Jul 2018 12:14:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482439#M16645</guid>
      <dc:creator>sasuerrr</dc:creator>
      <dc:date>2018-07-30T12:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482517#M16646</link>
      <description>&lt;P&gt;Oh - I was assuming that was the graph you are currently getting (ie, what you didn't want!) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 15:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482517#M16646</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2018-07-30T15:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482557#M16647</link>
      <description>&lt;P&gt;Procedure SGPLOT with Journal2 style will produce this output, with different fill patterns, one for each group value.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cars_Journal2.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22115i5C882CE7E888122E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cars_Journal2.png" alt="Cars_Journal2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.cars(where=(origin ne 'Europe')) noborder;&lt;BR /&gt; vbar type / response=mpg_city stat=mean group=origin &lt;BR /&gt; groupdisplay=cluster displaybaseline=auto;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jul 2018 18:10:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482557#M16647</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-07-30T18:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482669#M16650</link>
      <description>&lt;P&gt;Hi Sanjay,&lt;/P&gt;
&lt;P&gt;Thanks much for the response. Couple of questions for below graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.) How can I control the display of x-axis groups. For example if I want to display in this order - Sedan, Wagon, Truck, Sports, SUV, Hybrid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.) Is there any workaround if I do not want to use journal2 style.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot for your response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 02:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482669#M16650</guid>
      <dc:creator>sasuerrr</dc:creator>
      <dc:date>2018-07-31T02:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482704#M16652</link>
      <description>&lt;P&gt;Another way with good old SAS/GRAPH:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;pattern1 v=l5 c=black ;
pattern2 v=x5 c=black ;
axis1 order=('Sedan' 'Wagon' 'Truck' 'Sports' 'SUV' 'Hybrid');
goptions dev=png;
proc gchart data=sashelp.cars(where=(origin ne 'Europe')) ; 
  vbar type / sumvar=mpg_city mean group=origin maxis=axis1 patternid=group ;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22122iE43B11FAD9CC1703/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please avoid attachments and add code and images inline when possible.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 05:07:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482704#M16652</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-31T05:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482859#M16655</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35798"&gt;@sasuerrr&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Sanjay,&lt;/P&gt;
&lt;P&gt;Thanks much for the response. Couple of questions for below graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.) How can I control the display of x-axis groups. For example if I want to display in this order - Sedan, Wagon, Truck, Sports, SUV, Hybrid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For most consistent display of non-typical sort order as shown create a numerical variable with values in the order you want and assign a custom display format to show the desired text. If the order is based on frequency of occurrence you may be able to summarize your data and sort by decreasing frequency and use discreteorder=data for a discrete axis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please describe why you do not want to use Journal2. It may be that you can create a custom ods style based on journal2 that will get around what ever issue you have. But we would have to know what the issues might be. I am also not convinced that you have to use journal2 at all. Since the option FILLPATTERNATTRS is a GTL option you might share the rest of what you are attempting.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 16:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482859#M16655</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-31T16:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482891#M16656</link>
      <description>&lt;P&gt;1.) How can I control the display of x-axis groups. For example if I want to display in this order - Sedan, Wagon, Truck, Sports, SUV, Hybrid&lt;/P&gt;
&lt;P&gt;There are multiple ways to control the category order on the x-axis.&amp;nbsp; Default for SGPLOT is ascending alphabetical sort.&amp;nbsp; You can sort the data in&amp;nbsp;any way you want and request Data order by setting DISCRETEORDER=data on the XAXIS statement.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.) Is there any workaround if I do not want to use journal2 style.&lt;/P&gt;
&lt;P&gt;I believe you can use any style, as long as you enable the fillpatterns and supply the patterns for the style, if they are missing.&amp;nbsp; Journal2 and Journal3 already include fill patterns in the style.&amp;nbsp; Others do not, but you can now provide them by using the STYLEATTRS DATAFILLPATTERNS (9.4M5).&amp;nbsp; Also, if using HTML, remember to change the ATTRPRIORITY=none.&amp;nbsp; Instead, you can use use JOURNAL3 and provide colors in the STYLEATTRS DATACOLORS (9.4M0) list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / attrpriority=none;
proc sgplot data=sashelp.cars; 
  styleattrs datafillpatterns=(l1 x1 r1);
  vbar type / response=mpg_city stat=mean group=origin groupdisplay=cluster fill fillpattern;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BarPatterns.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22130iDBAE78A07538141B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BarPatterns.png" alt="BarPatterns.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 17:42:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/482891#M16656</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-07-31T17:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/483163#M16664</link>
      <description>&lt;P&gt;Here's a bit more detailed example for doing it with SAS/Graph. You can use any ods style you want, and you can specify the patterns via the pattern statements:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pattern1 v=l1 c=gray33;&lt;BR /&gt;pattern2 v=x1 c=gray33;&lt;BR /&gt;pattern3 v=r1 c=gray33;&lt;BR /&gt;axis1 label=none order=('Sedan' 'Wagon' 'Truck' 'Sports' 'SUV' 'Hybrid') offset=(2,2);&lt;BR /&gt;axis2 label=none value=none;&lt;BR /&gt;axis3 label=none minor=none style=0 offset=(0,0);&lt;BR /&gt;legend1 position=(top right inside) shape=bar(.15in,.15in) offset=(0,-3);&lt;BR /&gt;goptions dev=png;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title ls=1.5 "Sashelp.cars data (mean city mpg)";&lt;BR /&gt;proc gchart data=sashelp.cars; &lt;BR /&gt;vbar origin / sumvar=mpg_city type=mean nozero &lt;BR /&gt;subgroup=origin /* color &amp;amp; legend */ &lt;BR /&gt;legend=legend1&lt;BR /&gt;group=type noframe&lt;BR /&gt;gaxis=axis1 maxis=axis2 raxis=axis3&lt;BR /&gt;space=0 autoref cref=graydd clipref;&lt;BR /&gt;run;&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="clustered.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22149iC08E401BA35F8DB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="clustered.png" alt="clustered.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 19:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/483163#M16664</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2018-08-01T19:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bar graph with patterns in grey scale</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/486162#M16752</link>
      <description>&lt;P&gt;Thanks much Robert, Sanjay and Chris. Your suggestions were really helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Aug 2018 15:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/clustered-bar-graph-with-patterns-in-grey-scale/m-p/486162#M16752</guid>
      <dc:creator>sasuerrr</dc:creator>
      <dc:date>2018-08-12T15:22:02Z</dc:date>
    </item>
  </channel>
</rss>

