<?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 only using half the graph space (offsetmax default value) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568810#M18361</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running a simple program to produce a bubble plot as shown below. But when I run it, the output plot shows the max events on the X axis as 20, but it puts the max value in the middle of the graph space and nothing but empty space to the right.&amp;nbsp; If I add offsetmax=0 to the xaxis definition line, then it works as I would expect.&amp;nbsp; I am not sure I understand why the default value of offsetmax stops at the mid point.&amp;nbsp; Looking at the documentation, the default value "should" have auto filled the xaxis across the full width of the graph.&amp;nbsp; Any thoughts?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on / reset=all;
ods graphics / width = 100pct height = 100pct;
title 'Total Cost by Events and $ per Event';
proc sgplot data=work.myData noautolegend;
  bubble x=events y=cost size=Total_Cost/ group=subsystem datalabel=subsystem 
    transparency=0.4 datalabelattrs=(size=9 weight=bold);
  yaxis grid ;
  xaxis grid values=(0 to 20 by 5) integer ;
run;

ods graphics off; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2019 15:02:38 GMT</pubDate>
    <dc:creator>FredGIII</dc:creator>
    <dc:date>2019-06-25T15:02:38Z</dc:date>
    <item>
      <title>SGPLOT only using half the graph space (offsetmax default value)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568810#M18361</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running a simple program to produce a bubble plot as shown below. But when I run it, the output plot shows the max events on the X axis as 20, but it puts the max value in the middle of the graph space and nothing but empty space to the right.&amp;nbsp; If I add offsetmax=0 to the xaxis definition line, then it works as I would expect.&amp;nbsp; I am not sure I understand why the default value of offsetmax stops at the mid point.&amp;nbsp; Looking at the documentation, the default value "should" have auto filled the xaxis across the full width of the graph.&amp;nbsp; Any thoughts?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on / reset=all;
ods graphics / width = 100pct height = 100pct;
title 'Total Cost by Events and $ per Event';
proc sgplot data=work.myData noautolegend;
  bubble x=events y=cost size=Total_Cost/ group=subsystem datalabel=subsystem 
    transparency=0.4 datalabelattrs=(size=9 weight=bold);
  yaxis grid ;
  xaxis grid values=(0 to 20 by 5) integer ;
run;

ods graphics off; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 15:02:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568810#M18361</guid>
      <dc:creator>FredGIII</dc:creator>
      <dc:date>2019-06-25T15:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT only using half the graph space (offsetmax default value)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568814#M18362</link>
      <description>&lt;P&gt;Since setting OFFSETMAX helps, that may be a clue.&amp;nbsp;Displaying data label causes the offsets to be set on all sides so the text will not be clipped.&amp;nbsp; Remove the data label and see if you get the right result.&amp;nbsp; If yes, then you do need to set the offsetmin or max to remove the excess offsets.&amp;nbsp; Or, you can use a TEXT plot to display the labels.&amp;nbsp; Text plot allows better control on offsets.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 15:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568814#M18362</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2019-06-25T15:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT only using half the graph space (offsetmax default value)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568816#M18363</link>
      <description>&lt;P&gt;From your program, it appears that the "event" variable to probably character, making the X axis discrete. When using bubbles with a discrete axis, the axis offsets will automatically adjust to accommodate the possibility of the largest bubble being on the end. As you found, you can override this behavior using OFFSETMIN/OFFSETMAX.&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>Tue, 25 Jun 2019 15:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568816#M18363</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-06-25T15:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT only using half the graph space (offsetmax default value)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568817#M18364</link>
      <description>&lt;P&gt;My guess is that the length of the 'subsystem' variable is large (like 80). When you use a character variable as the argument to the DATALABEL= option, the plot will leave room for the maximum length.&amp;nbsp; You can either change the length of the variable when it is created or I think you can add&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format subsystem $10.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;after the PROC SGPLOT statement.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 15:13:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568817#M18364</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-06-25T15:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT only using half the graph space (offsetmax default value)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568824#M18365</link>
      <description>&lt;P&gt;So it did turn out that it was the length of the data label that was causing the problem.&amp;nbsp; I appreciate the quick responses.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 15:27:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-only-using-half-the-graph-space-offsetmax-default-value/m-p/568824#M18365</guid>
      <dc:creator>FredGIII</dc:creator>
      <dc:date>2019-06-25T15:27:55Z</dc:date>
    </item>
  </channel>
</rss>

