<?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: line shift on y-axis tick label in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/line-shift-on-y-axis-tick-label/m-p/728196#M21187</link>
    <description>&lt;P&gt;Try adding LABELFITPOLICY=SPLIT iIn the YAXISOPTS=(...) list of options.&lt;/P&gt;
&lt;P&gt;And instead of unicode, define&amp;nbsp;&lt;/P&gt;
&lt;P&gt;labelsplitchar=";"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(or some other character) and imbed the split character into the labels.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Mar 2021 14:19:50 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2021-03-22T14:19:50Z</dc:date>
    <item>
      <title>line shift on y-axis tick label</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/line-shift-on-y-axis-tick-label/m-p/728150#M21184</link>
      <description>&lt;P&gt;I am doing an template for an AE dotplot for clinical trials. The text string for a preferred term is shown on the y axis. Often the text string is very long why I want have a line break so the term will be on two lines (the y axis tick mark label). I have tried to get force a line shift in the text string by setting in the unicode for a line break&amp;nbsp; - (*ESC*){unicode '000a'x} - but that does not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing the plot in GTL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
   define statgraph aedotplot;
   
      begingraph ;

    
         layout lattice /columns=5 
                         columnweights = (0.4 0.1 0.1 0.2 0.2) 
                         rowdatarange=unionall 
                         columngutter=0 
                         ;
                         

            layout overlay / walldisplay=none 
                             border=false 
                             x2axisopts=(display=(tickvalues ) 
                             displaysecondary=(line)) 
                             yaxisopts=(linearopts=(tickvaluesequence=(start=1 end=&amp;amp;count increment=1))
                                       display=none
                                       displaysecondary=none
                                       );

      /*--Draw alternating bands using referenceline--*/
               referenceline y = display2nd/ lineattrs=(thickness=&amp;amp;RefThickness.PCT) datatransparency=0.9;
/*             left colum with text box */
               scatterplot y=display x=display_label / markercharacter=display MARKERCHARACTERPOSITION=right yaxis=Y xaxis=X2 markerattrs=(size=0) includemissinggroup=true;

            endlayout;&lt;BR /&gt;......&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas ?&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;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aedotplot.jpg" style="width: 572px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56235iA1177DAF3D1BAADC/image-size/large?v=v2&amp;amp;px=999" role="button" title="aedotplot.jpg" alt="aedotplot.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 12:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/line-shift-on-y-axis-tick-label/m-p/728150#M21184</guid>
      <dc:creator>Claus_Stenberg</dc:creator>
      <dc:date>2021-03-22T12:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: line shift on y-axis tick label</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/line-shift-on-y-axis-tick-label/m-p/728196#M21187</link>
      <description>&lt;P&gt;Try adding LABELFITPOLICY=SPLIT iIn the YAXISOPTS=(...) list of options.&lt;/P&gt;
&lt;P&gt;And instead of unicode, define&amp;nbsp;&lt;/P&gt;
&lt;P&gt;labelsplitchar=";"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(or some other character) and imbed the split character into the labels.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 14:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/line-shift-on-y-axis-tick-label/m-p/728196#M21187</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-03-22T14:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: line shift on y-axis tick label</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/line-shift-on-y-axis-tick-label/m-p/728227#M21190</link>
      <description>&lt;P&gt;Thanks for the suggestion Rick.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, can't get it to work.......&amp;nbsp;Is it like this you would suggest (don't mind the plot - give no meaning what so ever ! - should give a tick label with two line with the name of students).:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
   define statgraph plot;
   begingraph ;
      layout overlay /   YAXISOPTS = (LABELFITPOLICY=SPLIT 
                                       labelsplitchar="|" ) 
                                      ; 
             scatterplot y=name2 x=age;
      endlayout;
   Endgraph;
   end;
 run;

 data class2;
    set sashelp.class;
    name2=name||"|"||name;
run;    
    
 proc sgrender data=class2 template=plot;
 run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 16:58:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/line-shift-on-y-axis-tick-label/m-p/728227#M21190</guid>
      <dc:creator>Claus_Stenberg</dc:creator>
      <dc:date>2021-03-22T16:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: line shift on y-axis tick label</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/line-shift-on-y-axis-tick-label/m-p/728230#M21191</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;template;
   define statgraph plot;
   begingraph ;
      layout overlay /   YAXISOPTS = (discreteopts =( tickvaluefitpolicy=splitalways
                                       tickvaluesplitchar="|"
                                       
                                       ) 
                                     ) 
                                      ; 
             scatterplot y=name2 x=age;
      endlayout;
   Endgraph;
   end;
 run;&lt;/PRE&gt;
&lt;P&gt;Make sure your graph has enough vertical space for all the split lines.&lt;/P&gt;
&lt;P&gt;LABEL policies are for the thing like "Student name" that describes the axis as a whole. TICKVALUE policies affect the tick value text appearance.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 17:22:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/line-shift-on-y-axis-tick-label/m-p/728230#M21191</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-22T17:22:45Z</dc:date>
    </item>
  </channel>
</rss>

