<?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: Is it possible to control vertical space around tick values and axis labels in PROC SGPLOT? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311859#M10971</link>
    <description>&lt;P&gt;Thanks again Sanjay.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SAS documention implied the default was "no padding" so I had assumed there already was no bottom pad.&lt;/P&gt;
&lt;P&gt;But you know what they say about assuming.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your suggested code does&amp;nbsp;indeed make a difference.&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;
&lt;P&gt;&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>Tue, 15 Nov 2016 22:02:42 GMT</pubDate>
    <dc:creator>ABritinAus</dc:creator>
    <dc:date>2016-11-15T22:02:42Z</dc:date>
    <item>
      <title>Is it possible to control vertical space around tick values and axis labels in PROC SGPLOT?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311312#M10954</link>
      <description>&lt;P&gt;Hi SAS community&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm a fairly experienced PROC SGPLOT user, so I hope I haven't missed something simple in the online documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few questions re sizing in PROC SGPLOT&amp;nbsp; (not PROC GPLOT)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to control any of the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Tick mark size&amp;nbsp;(ie tick mark length)&lt;/P&gt;
&lt;P&gt;2) The amount of vertical space between x-axis tick MARKS and tick&amp;nbsp;VALUES&lt;/P&gt;
&lt;P&gt;3) The amount of vertical space between x-axis tick VALUEs and x-axis label (label must be below the VALUEs, not to the left or right).&lt;/P&gt;
&lt;P&gt;4) The amount of vertical space between the top of the y-axis and the y-axis label when using labelpos=top?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All of the sizes and spacings are fine when using a sensible chart size such as say 4in high x 6in wide.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But once you make the chart sizes smaller (don't ask me why you would - I just work here!) or larger these default sizes and spaces seem to remain constant, rather than proportional to chart size and they no longer look&amp;nbsp;so good.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are required to have standard font sizes, regardless of chart size, so the scale option is of no use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can quite easily annotate&amp;nbsp;tick marks and labels&amp;nbsp;on myself, but am hoping for a simpler solution for some of our less experienced SAS users.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using SAS 9.4, maintenance release 3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2016 03:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311312#M10954</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2016-11-14T03:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control vertical space around tick values and axis labels in PROC SGPLOT?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311450#M10958</link>
      <description>&lt;P&gt;There is no way to make the changes you are asking if you set SCALE=OFF. &amp;nbsp;The scale option was put in place precisely to control these settings when the graph size is changed (especially reduced), to result in "nicer" values. &amp;nbsp;However the font is also scaled. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having said that, various sizes are factored by the ratio of graph heights. &amp;nbsp;For fonts, the factor is (new graph height / default graph height) ** 0.25. &amp;nbsp;Usually, defaul height is 480px. &amp;nbsp;So, if you want the scaling of the gaps, but not for the fonts, you could set &lt;SPAN&gt;SCALE=ON and then&amp;nbsp;&lt;/SPAN&gt;scale up the font sizes by the reverse of this factor to keep fonts sizes constant .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, for a graph height of 200 px, the font scale factor will be (200/480)**0.25 = 0.803. &amp;nbsp;You can try setting the font sizes higher by 1/0.803=1.244 or about 25%. &amp;nbsp;For LISTING style, value font is 9pt. &amp;nbsp;You can try setting it to 12.5pt to get the same size as the original unscaled font. &amp;nbsp;Gap factors are linear to the height scale, so they will still shrink. &amp;nbsp;Try that to see if you get a better result. &amp;nbsp;You will need to change all the font sizes, either in the syntax, or in the style.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods graphics / reset width=6.4in height=4.8in imagename='Full';
title '11 pt font';
proc sgplot data=sashelp.class;
  scatter x=height y=weight;
run;

ods graphics / reset width=6.4in height=2in imagename='Small';
title h=14pt '11 pt font';
proc sgplot data=sashelp.class;
  scatter x=height y=weight;
  xaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt);
  yaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt);
run;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5844i56CF13C9BA80362E/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Full.png" title="Full.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5845iC276C86CD836B977/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Small.png" title="Small.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2016 16:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311450#M10958</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-11-14T16:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control vertical space around tick values and axis labels in PROC SGPLOT?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311597#M10961</link>
      <description>&lt;P&gt;Thanks Sanjay&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Makes perfect sense:&amp;nbsp; knowing that formulae really helps, and it has worked well for our purposes.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 03:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311597#M10961</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2016-11-15T03:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control vertical space around tick values and axis labels in PROC SGPLOT?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311598#M10962</link>
      <description>&lt;P&gt;Note: &amp;nbsp;The same formula also applies to marker size for scatter plot. &amp;nbsp;Default marker size is 7px. &amp;nbsp;You can use the font multiplier to scale up the marker too.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 03:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311598#M10962</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-11-15T03:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control vertical space around tick values and axis labels in PROC SGPLOT?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311602#M10963</link>
      <description>&lt;P&gt;Good to know Sanjay, thanks again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A related question (hopefully ok to pose here rather than a new post): compared to SAS/Graph, the amount of vertical white space between&amp;nbsp;a top outside&amp;nbsp;legend and the y-axis label (if using labelpos=top which we have to use) is quite large on standard sized graphs.&amp;nbsp;(see attached).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see that the space would be useful if&amp;nbsp;the legend was wide and extended to the left to be above the y-xis label.&amp;nbsp; But in the attached, it does seem like qute a lot of space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To meet our publication standards we tend to have to not have a y-axis label and annotate one on to reduce that large gap between the legend and the y-axis label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there an option we are missing to reduce the&amp;nbsp;amount of whitespace under the legend?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13139i224F8CCBB11A099A/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;</description>
      <pubDate>Tue, 15 Nov 2016 04:00:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311602#M10963</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2016-11-15T04:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control vertical space around tick values and axis labels in PROC SGPLOT?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311742#M10964</link>
      <description>&lt;P&gt;Yes. &amp;nbsp;Use OUTERPAD=(BOTTOM=0) in the KEYLEGEND statement to remove all the bottom padding (outside the border). &amp;nbsp;Note, the gap may look higher&amp;nbsp;than expected when there are no descenders in the legend values.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 15:39:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311742#M10964</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-11-15T15:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control vertical space around tick values and axis labels in PROC SGPLOT?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311859#M10971</link>
      <description>&lt;P&gt;Thanks again Sanjay.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SAS documention implied the default was "no padding" so I had assumed there already was no bottom pad.&lt;/P&gt;
&lt;P&gt;But you know what they say about assuming.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your suggested code does&amp;nbsp;indeed make a difference.&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;
&lt;P&gt;&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>Tue, 15 Nov 2016 22:02:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-vertical-space-around-tick-values-and/m-p/311859#M10971</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2016-11-15T22:02:42Z</dc:date>
    </item>
  </channel>
</rss>

