<?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: alignemt of tick marks in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/735176#M21365</link>
    <description>&lt;P&gt;Thanks for your suggestion about the &lt;SPAN&gt;AXISTABLE solution&lt;/SPAN&gt;.&amp;nbsp; Was down that road initially but then used the scatterplot option as it was easier to make dynamic. Will revert and try this once more &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Apr 2021 06:59:26 GMT</pubDate>
    <dc:creator>Claus_Stenberg</dc:creator>
    <dc:date>2021-04-19T06:59:26Z</dc:date>
    <item>
      <title>sgrender: alignemt of tick marks</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/734730#M21361</link>
      <description>&lt;P&gt;Doing a adverse event plot were I have to put some stat numbers together with a scatter plot (see below). Now I want the stat numbers to be right aligned with the tickmark at the x axis (see red inserted line).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
   define statgraph demo;
      begingraph ;
            layout overlay;
                      scatterplot y=name x=w / markercharacter =weightc   MARKERCHARACTERPOSITION=left    xaxis=x2;
                       scatterplot y=name x=h / markercharacter =height   MARKERCHARACTERPOSITION=left    xaxis=x2;
             endlayout; 
      endgraph;
   end;
run;
 
data class2;
 set sashelp.class;
 weightc=put(weight,4.1);
 heightc=put(height,4.1);
 w="kg";
 h="cm";
run;

proc sgrender data=class2 template=demo;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58120i7EB62677B757637A/image-size/large?v=v2&amp;amp;px=999" role="button" title="example.png" alt="example.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have created a little sandbox example using the good old sashelp.class :-). Any ideas on how to solve this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 11:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/734730#M21361</guid>
      <dc:creator>Claus_Stenberg</dc:creator>
      <dc:date>2021-04-19T11:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: alignemt of tick marks</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/734736#M21362</link>
      <description>&lt;P&gt;I see at least two issues. &lt;/P&gt;
&lt;P&gt;First I think you have the wrong variable for the markercharacter in the second scatter plot statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second, if you expect the formatted value to have a decimal for everything you need to provide a wide enough format.&lt;/P&gt;
&lt;P&gt;Using 4.1 with values like 112.5 for example, Alfred's weight you do not have enough space to display 112.5 you would need a 5.1. Otherwise the width specification of 4 means 112. uses all the positions. And if there is no value to right of the decimal then SAS doesn't display the decimal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So see if this gets closer to what you expect:&lt;/P&gt;
&lt;PRE&gt;proc template;
   define statgraph demo;
      begingraph ;
            layout overlay;
                      scatterplot y=name x=w / markercharacter =weightc   MARKERCHARACTERPOSITION=left    xaxis=x2;
                       scatterplot y=name x=h / markercharacter =heightc   MARKERCHARACTERPOSITION=left    xaxis=x2;
             endlayout; 
      endgraph;
   end;
run;
 
data class2;
 set sashelp.class;
 weightc=put(weight,5.1);
 heightc=put(height,4.1);
 w="kg";
 h="cm";
run;

proc sgrender data=class2 template=demo;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Apr 2021 14:40:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/734736#M21362</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-16T14:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: alignemt of tick marks</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/734762#M21363</link>
      <description>&lt;P&gt;You will get better results using AxisTable for displaying the numbers.&amp;nbsp; This can be done using SGPLOT with YAXISTABLE.&amp;nbsp; YAXISTABLE has many options for positioning of the text.&amp;nbsp; You can also use AXISTABLE in GTL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2016/05/06/ctspedia-graphs-dot-plot-of-primary-soc/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/graphicallyspeaking/2016/05/06/ctspedia-graphs-dot-plot-of-primary-soc/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/09/11/axis-tables-rotated-text.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2019/09/11/axis-tables-rotated-text.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;See the last example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 15:57:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/734762#M21363</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2021-04-16T15:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: alignemt of tick marks</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/735175#M21364</link>
      <description>&lt;P&gt;Thanks for your input. However the issue is the right alignment of the tickmark with the height and weight data. A solution could be to insert trailering blanks on the "kg" and "cm" but they just seem to be cut off when displaying.....Another solution&amp;nbsp; could be to go with the axais table as Matange suggesst below.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="Claus_Stenberg_0-1618814576668.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58308i6C85D758A3FE4C23/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Claus_Stenberg_0-1618814576668.png" alt="Claus_Stenberg_0-1618814576668.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 06:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/735175#M21364</guid>
      <dc:creator>Claus_Stenberg</dc:creator>
      <dc:date>2021-04-19T06:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: alignemt of tick marks</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/735176#M21365</link>
      <description>&lt;P&gt;Thanks for your suggestion about the &lt;SPAN&gt;AXISTABLE solution&lt;/SPAN&gt;.&amp;nbsp; Was down that road initially but then used the scatterplot option as it was easier to make dynamic. Will revert and try this once more &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 06:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgrender-alignemt-of-tick-marks/m-p/735176#M21365</guid>
      <dc:creator>Claus_Stenberg</dc:creator>
      <dc:date>2021-04-19T06:59:26Z</dc:date>
    </item>
  </channel>
</rss>

