<?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 sgplot grouped vbar offset? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-grouped-vbar-offset/m-p/83740#M3098</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a vertical bar chart, using SGPLOT, with two categories 4 groups in each.&amp;nbsp; When the category names are short, the x axis has nice min and max offsets and looks great.&amp;nbsp; But when the names are longer the offsets disappear.&amp;nbsp; Tried offsetmin , max on the xaxis statement and this fixes one side while making the other worse.&amp;nbsp; Tried discreteoffset this doesn't work either.&amp;nbsp; I previously have used GCHART for this particular plot, and I was able to manipulate the axis exactly how I wanted but I would prefer to use SGPLOT.&amp;nbsp; I would like to get the second plot to look more like the first one.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SHORTNAME.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3015_SHORTNAME.png" width="450" /&gt;&lt;IMG alt="LONGNAME.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3016_LONGNAME.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2013 17:02:58 GMT</pubDate>
    <dc:creator>sullivan0822</dc:creator>
    <dc:date>2013-01-23T17:02:58Z</dc:date>
    <item>
      <title>sgplot grouped vbar offset?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-grouped-vbar-offset/m-p/83740#M3098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a vertical bar chart, using SGPLOT, with two categories 4 groups in each.&amp;nbsp; When the category names are short, the x axis has nice min and max offsets and looks great.&amp;nbsp; But when the names are longer the offsets disappear.&amp;nbsp; Tried offsetmin , max on the xaxis statement and this fixes one side while making the other worse.&amp;nbsp; Tried discreteoffset this doesn't work either.&amp;nbsp; I previously have used GCHART for this particular plot, and I was able to manipulate the axis exactly how I wanted but I would prefer to use SGPLOT.&amp;nbsp; I would like to get the second plot to look more like the first one.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SHORTNAME.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3015_SHORTNAME.png" width="450" /&gt;&lt;IMG alt="LONGNAME.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3016_LONGNAME.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 17:02:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-grouped-vbar-offset/m-p/83740#M3098</guid>
      <dc:creator>sullivan0822</dc:creator>
      <dc:date>2013-01-23T17:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot grouped vbar offset?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-grouped-vbar-offset/m-p/83741#M3099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is a bug related to the inside legend.&amp;nbsp; If you put the legend outside, it seems to compute the offsets correctly.&amp;nbsp; With inside legend, you could work around by setting the cluster width to 0.7.&lt;/P&gt;&lt;P&gt;Or set yaxis offsetmax=0.1 which seems to trigger a relayout of the graph fixing the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Offsets are computed by the graph to accommodate the tick values.&amp;nbsp; If you set offsetmin and offsetmax, they override the values computed, so make sure your offset settings are large enough (offsetmin=0.2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Outside legend:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3018" alt="SGPlotLongValues.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/3018_SGPlotLongValues.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Inside Legend:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3019" alt="SGPlotLongValues.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/3019_SGPlotLongValues.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data longcatvalues;&lt;BR /&gt;&amp;nbsp; label grp='Quartile';&lt;BR /&gt;&amp;nbsp; do cat='A_Long_Label', 'B_Long_Label';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do grp='QTR1', 'QTR2', 'QTR3', 'QTR4';&lt;BR /&gt;&amp;nbsp;&amp;nbsp; response=20*(1+0.2*ranuni(2));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt; end;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgplot data=longcatvalues;&lt;BR /&gt;&amp;nbsp; vbar cat / response=response group=grp groupdisplay=cluster;&lt;BR /&gt;&amp;nbsp; keylegend / location=inside across=4 position=topleft;&lt;BR /&gt;&amp;nbsp; yaxis offsetmax=0.1;&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 17:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-grouped-vbar-offset/m-p/83741#M3099</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2013-01-23T17:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot grouped vbar offset?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-grouped-vbar-offset/m-p/83742#M3100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes both these fix it thank you (yaxis offset or clusterwidth).&amp;nbsp; I would not have thought of the y-axis offset.&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 17:53:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-grouped-vbar-offset/m-p/83742#M3100</guid>
      <dc:creator>sullivan0822</dc:creator>
      <dc:date>2013-01-23T17:53:18Z</dc:date>
    </item>
  </channel>
</rss>

