<?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: Allocating blank space on the left and right of a vbar graph in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569172#M18376</link>
    <description>&lt;P&gt;Good points.&amp;nbsp; Learning the newer stuff is on my list.&amp;nbsp; This sample can be run with the code below.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;input order ct pct;&lt;/P&gt;&lt;P&gt;format order order. ct st.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;0 2 66.7&lt;/P&gt;&lt;P&gt;0 1 67.4&lt;/P&gt;&lt;P&gt;1 2 0.0&lt;/P&gt;&lt;P&gt;1 1 26.3&lt;/P&gt;&lt;P&gt;2 2 100.0&lt;/P&gt;&lt;P&gt;2 1 100.0&lt;/P&gt;&lt;P&gt;;;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format; value st 2='Wholesale' 1='Retail'; value order 0='Statewide' 1='Regional' 2='National'; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods region y=3.2in x=.5in width=7.5in height=3in;&lt;/P&gt;&lt;P&gt;pattern2 value=solid color=darkblue;&lt;/P&gt;&lt;P&gt;pattern2 value=solid color=cyan;&lt;/P&gt;&lt;P&gt;pattern3 value=solid color=blue;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;legend1 position=(top) across=3 label=none ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis1 label=none value=none offset=(.5in,.5in) width=2;&lt;/P&gt;&lt;P&gt;axis2 label=none width=2;&lt;/P&gt;&lt;P&gt;axis3 label=none;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gchart data=test;&lt;/P&gt;&lt;P&gt;vbar order / type=sum sumvar=pct autoref clipref discrete noframe group=ct subgroup=order&lt;/P&gt;&lt;P&gt;width=14&lt;/P&gt;&lt;P&gt;gspace=8&lt;/P&gt;&lt;P&gt;space=0&lt;/P&gt;&lt;P&gt;legend=legend1&lt;/P&gt;&lt;P&gt;outside=sum&lt;/P&gt;&lt;P&gt;frame&lt;/P&gt;&lt;P&gt;maxis=axis1&lt;/P&gt;&lt;P&gt;raxis=axis2&lt;/P&gt;&lt;P&gt;gaxis=axis3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2019 17:10:50 GMT</pubDate>
    <dc:creator>bconner</dc:creator>
    <dc:date>2019-06-26T17:10:50Z</dc:date>
    <item>
      <title>Allocating blank space on the left and right of a vbar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569150#M18373</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to reproduce a vbar graph in SAS that was done in C#.&amp;nbsp; It has a 7.25" horizontal axis with 1 1/4" padding on the left and right.&lt;/P&gt;&lt;P&gt;I'm able to get everything dialed in&amp;nbsp;but the padding.&amp;nbsp; I'm assuming that would be on the axis statement with the maxis= parameter on the vbar statement.&amp;nbsp; Can someone point me in the right direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I'm looking for.&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Ben&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="vbar snippet" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30577i225C6395CC248547/image-size/large?v=v2&amp;amp;px=999" role="button" title="vbarsnip.JPG" alt="vbar snippet" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;vbar snippet&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 16:31:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569150#M18373</guid>
      <dc:creator>bconner</dc:creator>
      <dc:date>2019-06-26T16:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating blank space on the left and right of a vbar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569151#M18374</link>
      <description>&lt;P&gt;Example data and the code you are using so far will prevent us from having to pull details one a time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that your statement about "axis statement" and "maxis" almost certain means that you are using device based graphics such as GCHART. It may be time to start using the newer procedures such as&amp;nbsp;SGPLOT or the Graphics Template Language&amp;nbsp;where SAS is actively adding more functionality.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 16:35:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569151#M18374</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-06-26T16:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating blank space on the left and right of a vbar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569164#M18375</link>
      <description>&lt;P&gt;Assuming you are using PROC SGPLOT do create this output, use the OFFSETMIN and OFFSETMAX options on the XAXIS statement to move these bar clusters further in from the end of the axes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 16:57:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569164#M18375</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-06-26T16:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating blank space on the left and right of a vbar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569172#M18376</link>
      <description>&lt;P&gt;Good points.&amp;nbsp; Learning the newer stuff is on my list.&amp;nbsp; This sample can be run with the code below.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;input order ct pct;&lt;/P&gt;&lt;P&gt;format order order. ct st.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;0 2 66.7&lt;/P&gt;&lt;P&gt;0 1 67.4&lt;/P&gt;&lt;P&gt;1 2 0.0&lt;/P&gt;&lt;P&gt;1 1 26.3&lt;/P&gt;&lt;P&gt;2 2 100.0&lt;/P&gt;&lt;P&gt;2 1 100.0&lt;/P&gt;&lt;P&gt;;;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc format; value st 2='Wholesale' 1='Retail'; value order 0='Statewide' 1='Regional' 2='National'; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods region y=3.2in x=.5in width=7.5in height=3in;&lt;/P&gt;&lt;P&gt;pattern2 value=solid color=darkblue;&lt;/P&gt;&lt;P&gt;pattern2 value=solid color=cyan;&lt;/P&gt;&lt;P&gt;pattern3 value=solid color=blue;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;legend1 position=(top) across=3 label=none ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;axis1 label=none value=none offset=(.5in,.5in) width=2;&lt;/P&gt;&lt;P&gt;axis2 label=none width=2;&lt;/P&gt;&lt;P&gt;axis3 label=none;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc gchart data=test;&lt;/P&gt;&lt;P&gt;vbar order / type=sum sumvar=pct autoref clipref discrete noframe group=ct subgroup=order&lt;/P&gt;&lt;P&gt;width=14&lt;/P&gt;&lt;P&gt;gspace=8&lt;/P&gt;&lt;P&gt;space=0&lt;/P&gt;&lt;P&gt;legend=legend1&lt;/P&gt;&lt;P&gt;outside=sum&lt;/P&gt;&lt;P&gt;frame&lt;/P&gt;&lt;P&gt;maxis=axis1&lt;/P&gt;&lt;P&gt;raxis=axis2&lt;/P&gt;&lt;P&gt;gaxis=axis3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 17:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569172#M18376</guid>
      <dc:creator>bconner</dc:creator>
      <dc:date>2019-06-26T17:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating blank space on the left and right of a vbar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569191#M18377</link>
      <description>&lt;P&gt;Add your OFFSET to AXIS3 (your gaxis), not AXIS1 (your midpoint axis). That should give you what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 17:36:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569191#M18377</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-06-26T17:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating blank space on the left and right of a vbar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569199#M18378</link>
      <description>&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much!&amp;nbsp; Just didn't see it.&amp;nbsp; I don't use graph nearly as much as I used to.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 17:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569199#M18378</guid>
      <dc:creator>bconner</dc:creator>
      <dc:date>2019-06-26T17:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating blank space on the left and right of a vbar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569213#M18380</link>
      <description>&lt;P&gt;This may get you started:&lt;/P&gt;
&lt;PRE&gt;ods graphics /width=7.5in height=3in;

proc sgplot data=test ;
   styleattrs datacolors=(darkblue cyan blue)
;
   vbar ct /response=pct group=order
              groupdisplay=cluster clusterwidth=.7
   ;
   /* offsetmax and min are PROPOTIONS of the axis width
      not absolute measures the OFFSET and the CLUSTERWIDTH
      can interact as both are using proportions of axis width
   */
   xaxis offsetmin=.3 offsetmax=.3;
run;&lt;/PRE&gt;
&lt;P&gt;You will &lt;STRONG&gt;need &lt;/STRONG&gt;to refer to the documentation for the options as XAXIS and YAXIS statements are quite different than AXIS statements as far as options.&lt;/P&gt;
&lt;P&gt;KEYLEGEND controls appearance of the legend&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are actually 3 different VBAR statements: VBAR VBARPARM and VBARBASIC. The VBARPARM is likely better with summary data. VBARBASIC would be used if you want to overlay other data such as a scatter, series or box plot on the same chart. (Told you there were more things you could do with SGPLOT than GCHART)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The colors will be based on the current active style unless overridden such as with the STYLEATTRS statement for the data colors. Similar overrides are available for markers and lines. Consult the documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use the same color/line/marker/fill patterns frequently you might also consider creating DATTRMAP, for discrete data values, or RATTRMAP datasets that can consistently apply the same rules for similar values.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 18:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569213#M18380</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-06-26T18:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating blank space on the left and right of a vbar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569273#M18387</link>
      <description>&lt;P&gt;Wow.&amp;nbsp; You weren't kidding.&amp;nbsp; When I'm done with this I better start looking at the sg* graph proc families.&lt;/P&gt;&lt;P&gt;Some days I feel so old...&amp;nbsp; (then, I did start with vsn 5.13).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Ben&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 20:14:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569273#M18387</guid>
      <dc:creator>bconner</dc:creator>
      <dc:date>2019-06-26T20:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Allocating blank space on the left and right of a vbar graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569279#M18388</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/94457"&gt;@bconner&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Wow.&amp;nbsp; You weren't kidding.&amp;nbsp; When I'm done with this I better start looking at the sg* graph proc families.&lt;/P&gt;
&lt;P&gt;Some days I feel so old...&amp;nbsp; (then, I did start with vsn 5.13).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;After you get a feel for the SGPLOT and SGPANEL then you end up in GTL (Graphics Template Language) and Proc SGRENDER&amp;nbsp;that lets you create such single images as found on this page:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/35/177.html" target="_blank"&gt;http://support.sas.com/kb/35/177.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;go to the results tab&lt;/P&gt;
&lt;P&gt;Or just scan through the images on &lt;A href="http://support.sas.com/sassamples/graphgallery/PROC_SGRENDER.html" target="_blank"&gt;http://support.sas.com/sassamples/graphgallery/PROC_SGRENDER.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 20:36:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Allocating-blank-space-on-the-left-and-right-of-a-vbar-graph/m-p/569279#M18388</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-06-26T20:36:40Z</dc:date>
    </item>
  </channel>
</rss>

