<?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: Sgplot reserves large space for textplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-reserves-large-space-for-textplot/m-p/776196#M22182</link>
    <description>&lt;P&gt;Look at the CONTRIBUTEOFFSETS option on the TEXT plot. For your case, the best option is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;contributeoffsets = (ymin ymax)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That way, the text will not get clipped off along the top or bottom of your graph, but you will not get the extra space along the sides. Of, you can do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;contributeoffsets = none&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;since your labels are in the middle of your graph.&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>Mon, 25 Oct 2021 13:52:53 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2021-10-25T13:52:53Z</dc:date>
    <item>
      <title>Sgplot reserves large space for textplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-reserves-large-space-for-textplot/m-p/776181#M22181</link>
      <description>&lt;P&gt;Hi, I'm creating a plot where i want to label a point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following program creates data and creates the plot&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data t;
	do i=0 to 60 by 1;
		month=intnx('month','01nov2017'd,i,'b');
		v= rand('normal');
		if i = 20 then do;
			v2=v;
			label='I want a text label.............................';
		end;
		else do;
			v2 = .;
			label='';
		end;

		output;
	end;
	format month date9.;
run;

proc sgplot data=t;
	scatter x=month y=v;
	
	text x=month y=v2 text=label/ position=topright;

	xaxis display=(nolabel) grid interval=month;
run;&lt;/PRE&gt;&lt;P&gt;When running the program as above the following appears&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaalNavestad_0-1635165863695.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64998i32B5C13DA33A5205/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaalNavestad_0-1635165863695.png" alt="PaalNavestad_0-1635165863695.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There is large unused space to he right.&lt;/P&gt;&lt;P&gt;If I run the program with topleft instead I get large unused space to the left instead.&lt;/P&gt;&lt;P&gt;Running with the position = Center&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaalNavestad_1-1635166006894.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64999iDC26C87E4D256B0E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaalNavestad_1-1635166006894.png" alt="PaalNavestad_1-1635166006894.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get unused space both left and right.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is:&lt;/P&gt;&lt;P&gt;Are there any option(s) where I can avoid the large unused space?&lt;/P&gt;&lt;P&gt;If not is this a bug. It seems strange that the system set aside space that only will be used when the labels are at the end and is completely unnecessary when the labels are in the middle of the plot?&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&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;</description>
      <pubDate>Mon, 25 Oct 2021 12:49:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-reserves-large-space-for-textplot/m-p/776181#M22181</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2021-10-25T12:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot reserves large space for textplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-reserves-large-space-for-textplot/m-p/776196#M22182</link>
      <description>&lt;P&gt;Look at the CONTRIBUTEOFFSETS option on the TEXT plot. For your case, the best option is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;contributeoffsets = (ymin ymax)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That way, the text will not get clipped off along the top or bottom of your graph, but you will not get the extra space along the sides. Of, you can do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;contributeoffsets = none&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;since your labels are in the middle of your graph.&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>Mon, 25 Oct 2021 13:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-reserves-large-space-for-textplot/m-p/776196#M22182</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2021-10-25T13:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot reserves large space for textplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-reserves-large-space-for-textplot/m-p/776200#M22184</link>
      <description>&lt;P&gt;Thanks a lot worked like a dream.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pål N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 14:20:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-reserves-large-space-for-textplot/m-p/776200#M22184</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2021-10-25T14:20:50Z</dc:date>
    </item>
  </channel>
</rss>

