<?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: How to control Y2axis tick value labels using PROC TEMPLATE in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-control-Y2axis-tick-value-labels-using-PROC-TEMPLATE/m-p/786573#M22443</link>
    <description>&lt;P&gt;Have you tried using Proc SGplot, rather than Proc SGrender &amp;amp; custom template?&lt;/P&gt;
&lt;P&gt;(just curious if there's a specific functionality you're wanting, that's not available in sgplot)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Dec 2021 02:24:31 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2021-12-18T02:24:31Z</dc:date>
    <item>
      <title>How to control Y2axis tick value labels using PROC TEMPLATE</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-control-Y2axis-tick-value-labels-using-PROC-TEMPLATE/m-p/786572#M22442</link>
      <description>&lt;P&gt;I am trying to create a graph expecting with y2axis tick labels and&amp;nbsp; removing&amp;nbsp; y2axis label. How I can achieve it.&amp;nbsp; any suggestions? thank you.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1639791983417.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66842i50C422BF6C9484B4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1639791983417.png" alt="SASuserlot_0-1639791983417.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data orci;
 input effect$ OR LCL UCL;
 cards;
 AGE 1.05 1.01 1.09
 BEC 1.00 0.98 1.02
 IVHX 0.70 0.54 0.89
 DRUTX 0.94 0.90 0.99
 RACE 1.26 0.81 1.95
 TREAT 1.54 1.04 2.27
 SITE 1.13 0.74 1.72
 ;
 RUN;
 data orci1;

 effect='Cats';
 run;

 data orci2;
 set orci orci1;
 orci=_n_;
 xval=0;
 run;


proc template;
	define statgraph xx;
		begingraph/BORDER=off;


layout overlay /  border=false walldisplay= none
                             yaxisopts=(reverse=false type=discrete display=none)
                             xaxisopts = (display=none offsetmin=0 offsetmax=.7);
                    entry  halign=center " " / pad=(right=40%) location=outside 
					valign=top textattrs=(family="Courier New" size=10pt);

              scatterplot  x=xval y=orci / markercharacter=effect  yaxis=y2
							markercharacterposition= left markercharacterattrs=(family="Courier New" size=10pt);
			 
              endlayout;
endgraph;
end;
run;

proc sgrender data=orci2 template="xx";
run; 

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2021 01:48:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-control-Y2axis-tick-value-labels-using-PROC-TEMPLATE/m-p/786572#M22442</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2021-12-18T01:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to control Y2axis tick value labels using PROC TEMPLATE</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-control-Y2axis-tick-value-labels-using-PROC-TEMPLATE/m-p/786573#M22443</link>
      <description>&lt;P&gt;Have you tried using Proc SGplot, rather than Proc SGrender &amp;amp; custom template?&lt;/P&gt;
&lt;P&gt;(just curious if there's a specific functionality you're wanting, that's not available in sgplot)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2021 02:24:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-control-Y2axis-tick-value-labels-using-PROC-TEMPLATE/m-p/786573#M22443</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2021-12-18T02:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to control Y2axis tick value labels using PROC TEMPLATE</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-control-Y2axis-tick-value-labels-using-PROC-TEMPLATE/m-p/786576#M22444</link>
      <description>&lt;P&gt;I am very new to SGplot, and presently learning. We use GTL because of the flexibility it gives for our study-related Graphs.&amp;nbsp; I am not looking for functionality.&lt;/P&gt;
&lt;P&gt;1. I am looking to display the character values on Y2axis,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Either I want to display tickmark inside instead of outside. Is there any function or able to draw them using dummy data!&lt;/P&gt;
&lt;P&gt;Thank you for your response.&lt;/P&gt;
&lt;P&gt;I am kind of looking similar to the following image, instead, of Yaxis it should display on y2axis.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1639799282387.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66843iBAD07636DE414B78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1639799282387.png" alt="SASuserlot_0-1639799282387.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1639799441952.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66844i4A8D9085356EDEB7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1639799441952.png" alt="SASuserlot_0-1639799441952.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ref: Image Article "Graphs made easy using SAS Graph Template Language "&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2021 03:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-control-Y2axis-tick-value-labels-using-PROC-TEMPLATE/m-p/786576#M22444</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2021-12-18T03:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to control Y2axis tick value labels using PROC TEMPLATE</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-control-Y2axis-tick-value-labels-using-PROC-TEMPLATE/m-p/786586#M22445</link>
      <description>&lt;P&gt;Your "text" are not axis labels at all from your shown example. They are marker labels.&lt;/P&gt;
&lt;P&gt;One way to get the shown text as an axis label is a format for the actual variable making the axis with the desired values and associate the format with the variable in either the data or the Sgrender code.&lt;/P&gt;
&lt;P&gt;Other is in the Yaxisopts or Y2axisopts for DISCRETE axis you can use a number of options such as TICKVALUELIST , TICKVALUEDISPLAYLIST and TICKVALUEFORMAT The lists are rather fixed or require dynamic values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You control options on the Y2 axis with Y2axisopts .&lt;/P&gt;
&lt;P&gt;This gets most of what I think you are asking for with the given demo data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc format ;
 value orci
 1='AGE' 
 2='BEC'
 3='IVHX'
 4='DRUTX'
 5='RACE' 
 6='TREAT' 
 7='SITE' 
;
run;
proc template;
	define statgraph xx;
		begingraph/BORDER=off;


layout overlay /  border=false walldisplay= none
                             yaxisopts=(reverse=false type=discrete display=none )
                             y2axisopts=(type=discrete tickstyle=inside 
                                        label=" "
                                )
                             xaxisopts = (display=none offsetmin=0 offsetmax=.7);
                    entry  halign=center " " / pad=(right=40%) location=outside 
					valign=top textattrs=(family="Courier New" size=10pt);
              scatterplot  x=xval y=orci / 
                      yaxis=y2  
          ;
              endlayout;
endgraph;
end;
run;

proc sgrender data=orci2 template="xx";
format orci orci.;
run; &lt;/PRE&gt;
&lt;P&gt;Since your y values, orci are pretty much dummy values I didn't spend any time trying to fix an axis value with no corresponding text. That could be done here by not creating a Y value to plot against for the non-plot points:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;data orci2;
 set orci (in=in1) orci1;
 if in1 then orci=_n_;
 xval=0;
 run;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Dec 2021 07:45:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-control-Y2axis-tick-value-labels-using-PROC-TEMPLATE/m-p/786586#M22445</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-12-18T07:45:02Z</dc:date>
    </item>
  </channel>
</rss>

