<?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: Multiple but different labels on a given axis (xaxisopts &amp;amp; yaxisopts) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505978#M17239</link>
    <description>&lt;P&gt;Thanks. I won't further search an option which does not exist then.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll use the reference lines instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Oct 2018 15:21:36 GMT</pubDate>
    <dc:creator>xxformat_com</dc:creator>
    <dc:date>2018-10-19T15:21:36Z</dc:date>
    <item>
      <title>Multiple but different labels on a given axis (xaxisopts &amp; yaxisopts)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505864#M17222</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to add two different labels to the same axis. I got it using reference lines but it would make more sens to me to do it with xaxisopts and yaxisopts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
    define statgraph class;
        begingraph / border=false;
	        layout overlay 
	            / xaxisopts=(label='Test' 
	                         linearopts=(origin=60 
	                                     tickvaluesequence=(start    =40 
	                                                        end      =80 
	                                                        increment=10)
	                                     viewmin=40 
	                                     viewmax=80)
	                         displaysecondary=(label))
	              yaxisopts=(label     =' ' 
	                         linearopts=(origin=100 
	                                     tickvaluesequence=(start    =40 
	                                                        end      =160
	                                                        increment=20)
	                                     viewmin=40 
	                                     viewmax=160))
	              
	              walldisplay=none;
	              
	        scatterplot x=height y=weight;
                    
            endlayout;
        endgraph;
    end;
run;


*ods graphics/noborder;
proc sgrender data=sashelp.class template=class ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="two_labels.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24171iE97FC3FC561ED617/image-size/large?v=v2&amp;amp;px=999" role="button" title="two_labels.JPG" alt="two_labels.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected result (obtained with reference lines after removing the labels from the axis)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="two_labels.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24172iEF9EDC6D4257E642/image-size/large?v=v2&amp;amp;px=999" role="button" title="two_labels.JPG" alt="two_labels.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 09:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505864#M17222</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2018-10-19T09:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple but different labels on a given axis (xaxisopts &amp; yaxisopts)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505873#M17223</link>
      <description>&lt;P&gt;I expect you would need to use x2/y2axis to add differing labels to an axis.&amp;nbsp; For my money the axis on your given example is Weight, the high/low is a calculation plot not a label.&amp;nbsp; E.g. going down your route, why is 0 not labelled as no weight/no height?&amp;nbsp; Doesn't make sense does it.&amp;nbsp; The label indicates what is plotted on that axis, not what the value is.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 09:47:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505873#M17223</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-19T09:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple but different labels on a given axis (xaxisopts &amp; yaxisopts)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505895#M17225</link>
      <description>&lt;P&gt;"why is 0 not labelled" where do you see a zero? I guess that you mean why the other axis has no labelled ?&lt;/P&gt;&lt;P&gt;Simply because I've tried to limit the code to describe the problem. In my real program Both axes have labels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using proc template and as such we don't have x2axis. I gave a trial with x2axisopts and displaysecondary but couldn't get a different label.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
    define statgraph class;
        begingraph / border=false;
	        layout overlay 
	            / xaxisopts =(label='X' displaysecondary=all)
                  x2axisopts=(label='A')
	              yaxisopts =(label='Y' displaysecondary=all)
                  y2axisopts=(label='B')
	              
	              walldisplay=none;
	              
	        scatterplot x=height y=weight;
	  
                    
            endlayout;
        endgraph;
    end;
run;


*ods graphics/noborder;
proc sgrender data=sashelp.class template=class ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x2axis.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24175iE43E5F448EDE48CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="x2axis.JPG" alt="x2axis.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 12:06:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505895#M17225</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2018-10-19T12:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple but different labels on a given axis (xaxisopts &amp; yaxisopts)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505896#M17226</link>
      <description>&lt;P&gt;In order to use the x2/y2axis you have to have a graph that uses that axis even if that graph isn't visible.&amp;nbsp; I took your example and added the same scatterplot to the x2/y2 axes but made the markers size 0 so they don't show up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
    define statgraph class;
        begingraph / border=false;
	        layout overlay 
	            / xaxisopts =(label='X')
                  x2axisopts=(label='A')
	              yaxisopts =(label='Y')
                  y2axisopts=(label='B')
	              
	              walldisplay=none;
	              
	        scatterplot x=height y=weight;
	        scatterplot x=height y=weight / xaxis=x2 yaxis=y2 markerattrs=(size=0pt);
	  
                    
            endlayout;
        endgraph;
    end;
run;


*ods graphics/noborder;
proc sgrender data=sashelp.class template=class ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 12:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505896#M17226</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2018-10-19T12:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple but different labels on a given axis (xaxisopts &amp; yaxisopts)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505897#M17227</link>
      <description>&lt;P&gt;My point was not to find zero, my point was about creating a label based on a data item, i.e. high or low, e.g. why is zero not mentioned.&amp;nbsp; The label should tell the user what is plotted on the axis, not what the value is representing, i.e. the label is Weight, the tick at the top states the high limit and low limit.&lt;/P&gt;
&lt;P&gt;Anyway&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/2153"&gt;@JeffMeyers&lt;/a&gt;&amp;nbsp;has given you an example.&amp;nbsp; you could also just plot those two labels you want at the point you&amp;nbsp; want them.&amp;nbsp; In fact more or less anything can be overlaid using GTL.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 12:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505897#M17227</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-19T12:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple but different labels on a given axis (xaxisopts &amp; yaxisopts)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505921#M17229</link>
      <description>&lt;P&gt;Thanks. How do I change the orientation of the axis label. I would like to have them all horizontal.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 13:58:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505921#M17229</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2018-10-19T13:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple but different labels on a given axis (xaxisopts &amp; yaxisopts)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505928#M17230</link>
      <description>&lt;P&gt;As far as I'm currently aware there is no rotation option for axis labels.&amp;nbsp; However you can do a clever work around with the following code.&amp;nbsp; A lattice layout doesn't necessarily have to have multiple rows/columns, but by using it you open up COLUMNHEADERS, ROWHEADERS, and SIDEBAR blocks where you can place ENTRY statements.&amp;nbsp; These ENTRY statements are more customizable than the regular labels, and if you put them into a layout gridded block you can still create multiple lines for long labels.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
    define statgraph class;
        begingraph / border=false;
            layout lattice / rows=1 columns=1;
                columnheaders;   
                      entry 'X-axis Label';
                endcolumnheaders;
                column2headers;   
                      entry 'X2-axis Label';
                endcolumn2headers;
                rowheaders;   
                      entry 'Y-axis Label';
                endrowheaders;
                row2headers;   
                      entry 'Y2-axis Label';
                endrow2headers;
	        layout overlay 
	            / xaxisopts =(display=(line ticks tickvalues))
	              yaxisopts =(display=(line ticks tickvalues))
	              
	              walldisplay=none;
	              
	        scatterplot x=height y=weight;
	  
                endlayout ;   
            endlayout;
        endgraph;
    end;
run;


*ods graphics/noborder;
proc sgrender data=sashelp.class template=class ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505928#M17230</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2018-10-19T14:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple but different labels on a given axis (xaxisopts &amp; yaxisopts)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505978#M17239</link>
      <description>&lt;P&gt;Thanks. I won't further search an option which does not exist then.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll use the reference lines instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:21:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Multiple-but-different-labels-on-a-given-axis-xaxisopts-amp/m-p/505978#M17239</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2018-10-19T15:21:36Z</dc:date>
    </item>
  </channel>
</rss>

