<?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 reversing axis values in PROC TEMPLATE yaxisopts statement in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/826945#M23065</link>
    <description>&lt;P&gt;I want to use PROC TEMPLATE to produce a 3D graphic of a surface. I have the following definition, which works properly:&lt;/P&gt;
&lt;P&gt;proc template ;&lt;BR /&gt;define statgraph surfaceplot ;&lt;BR /&gt;begingraph ;&lt;BR /&gt;layout overlay3d / cube=false xaxisopts=( griddisplay=on ) yaxisopts=( griddisplay=on ) zaxisopts=( griddisplay=on )&amp;nbsp; ;&lt;BR /&gt;surfaceplotparm x=y y=x z=z / colormodel=( Blue Green Red ) colorresponse=z surfacetype=fillgrid ;&lt;BR /&gt;endlayout ;&lt;BR /&gt;endgraph ;&lt;BR /&gt;end ;&lt;BR /&gt;run ;&lt;/P&gt;
&lt;P&gt;How do I specify, using yaxisopts, that I want the values to be reversed, e.g., from 10 to 0 on the y-axis which represents the depth dimension, to instead run from 0 to 10?&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2022 16:55:29 GMT</pubDate>
    <dc:creator>rbettinger</dc:creator>
    <dc:date>2022-08-03T16:55:29Z</dc:date>
    <item>
      <title>reversing axis values in PROC TEMPLATE yaxisopts statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/826945#M23065</link>
      <description>&lt;P&gt;I want to use PROC TEMPLATE to produce a 3D graphic of a surface. I have the following definition, which works properly:&lt;/P&gt;
&lt;P&gt;proc template ;&lt;BR /&gt;define statgraph surfaceplot ;&lt;BR /&gt;begingraph ;&lt;BR /&gt;layout overlay3d / cube=false xaxisopts=( griddisplay=on ) yaxisopts=( griddisplay=on ) zaxisopts=( griddisplay=on )&amp;nbsp; ;&lt;BR /&gt;surfaceplotparm x=y y=x z=z / colormodel=( Blue Green Red ) colorresponse=z surfacetype=fillgrid ;&lt;BR /&gt;endlayout ;&lt;BR /&gt;endgraph ;&lt;BR /&gt;end ;&lt;BR /&gt;run ;&lt;/P&gt;
&lt;P&gt;How do I specify, using yaxisopts, that I want the values to be reversed, e.g., from 10 to 0 on the y-axis which represents the depth dimension, to instead run from 0 to 10?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 16:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/826945#M23065</guid>
      <dc:creator>rbettinger</dc:creator>
      <dc:date>2022-08-03T16:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: reversing axis values in PROC TEMPLATE yaxisopts statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/826959#M23068</link>
      <description>Have you tried the reverse=TRUE option in YAXISOPTS?</description>
      <pubDate>Wed, 03 Aug 2022 17:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/826959#M23068</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2022-08-03T17:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: reversing axis values in PROC TEMPLATE yaxisopts statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/826996#M23070</link>
      <description>&lt;P&gt;Thanks for a prompt reply.&lt;/P&gt;
&lt;P&gt;I checked the online documentation for general axis options for LAYOUT OVERLAY3D and did not find any reference to 'reverse='. There is, however, a 'reverse=true' option for general axis options for LAYOUT OVERLAY. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the following error:&lt;/P&gt;
&lt;DIV id="sasLogError1_1659557085303" class="sasError lia-indent-padding-left-30px"&gt;ERROR 22-322: Syntax error, expecting one of the following: DISPLAY, GRIDATTRS, GRIDDISPLAY, LABEL, LABELATTRS, LINEAROPTS,&lt;/DIV&gt;
&lt;DIV class="sasError lia-indent-padding-left-30px"&gt;LOGOPTS, OFFSETMAX, OFFSETMIN, TICKVALUEATTRS, TIMEOPTS, TYPE&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;in the following code:&lt;/DIV&gt;
&lt;DIV class="sasError lia-indent-padding-left-30px"&gt;proc template; &lt;BR /&gt;define statgraph surfaceplotparm; &lt;BR /&gt;begingraph; &lt;BR /&gt;entrytitle "Surface Plot of Lake Bed"; &lt;BR /&gt;layout overlay3d / cube=false xaxisopts=(label='Length of Lake') yaxisopts=( reverse=true ) ; &lt;BR /&gt;surfaceplotparm x=length y=width z=depth ;&lt;BR /&gt;endlayout; &lt;BR /&gt;endgraph; &lt;BR /&gt;end; &lt;BR /&gt;run;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;so I may just have to get creative to produce the results that I want.&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 20:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/826996#M23070</guid>
      <dc:creator>rbettinger</dc:creator>
      <dc:date>2022-08-03T20:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: reversing axis values in PROC TEMPLATE yaxisopts statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/827271#M23079</link>
      <description>&lt;P&gt;The solution to my question is to be found here: &lt;A href="https://support.sas.com/kb/24/859.html" target="_blank"&gt;https://support.sas.com/kb/24/859.html&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The description is: "This sample uses PROC G3D to reverse the values on the Y axis. The sample code multiplies the Y data values by -1 in order to reverse the axis order. A user-defined format is then created with PROC FORMAT to format the new Y axis values back to their original values."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, it also works for the PROC TEMPLATE layout overlay3d surfaceplotparm case, too. The sample code is attached.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 00:07:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/827271#M23079</guid>
      <dc:creator>rbettinger</dc:creator>
      <dc:date>2022-08-05T00:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: reversing axis values in PROC TEMPLATE yaxisopts statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/870744#M23699</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/319186"&gt;@rbettinger&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181543"&gt;@svh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've just had the same problem.&lt;/P&gt;
&lt;P&gt;My not so elegant solution multiplies by -1 and then uses tickvaluelist and tickdisplaylist.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;                        /* surface plot with continuous color ramp */
define statgraph SurfaceTmplt;
dynamic _KMS _AGE _Z _Title;              /* dynamic variables */

 begingraph;
 entrytitle _Title;                   /* specify title at run time (optional) */
  layout overlay3d / tilt=30
          xaxisopts=(label="kms" linearopts=(tickvaluelist=(0 30000 60000 90000 120000 150000 180000 240000 300000 )) )
          yaxisopts=(label="age" linearopts=(tickvaluelist=(-12 -24 -60 -84 -108 -120 )
                                             tickdisplaylist=('12' '24' '60' '84' '108' '120')))
          zaxisopts=(label="sales result" );
      
  
    surfaceplotparm x=_KMS y=_AGE z=_Z /  /* specify variables at run time */

       name="surface" 
       surfacetype=fill
       colormodel=threecolorramp      /* or =twocolorramp */
       colorresponse=_Z 
       reversecolormodel=true;
    continuouslegend "surface";

    
  endlayout;
endgraph;
end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Apr 2023 10:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/870744#M23699</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2023-04-20T10:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: reversing axis values in PROC TEMPLATE yaxisopts statement</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/870872#M23703</link>
      <description>&lt;P&gt;Thank you for sharing your work with us, acordes.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 19:42:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/reversing-axis-values-in-PROC-TEMPLATE-yaxisopts-statement/m-p/870872#M23703</guid>
      <dc:creator>rbettinger</dc:creator>
      <dc:date>2023-04-20T19:42:12Z</dc:date>
    </item>
  </channel>
</rss>

