<?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: Generating coloured 3D surface plots in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298075#M10554</link>
    <description>&lt;P&gt;Yes but are the colour options not limited beyond threecolouramp.&amp;nbsp;I want to make several graphs based on fixed colour values.&lt;/P&gt;&lt;P&gt;Thank you Rick&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2016 15:23:32 GMT</pubDate>
    <dc:creator>amrit11</dc:creator>
    <dc:date>2016-09-13T15:23:32Z</dc:date>
    <item>
      <title>Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297802#M10535</link>
      <description>&lt;P&gt;I want to generate a 3D surface plot eg :&amp;nbsp;&lt;A href="http://www.datavis.ca/sasmac/surface.html" target="_blank"&gt;http://www.datavis.ca/sasmac/surface.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I could not implement the code mentioned&amp;nbsp;here.&lt;/P&gt;&lt;P&gt;I tried :&amp;nbsp;&lt;A href="http://support.sas.com/kb/24/861.html" target="_blank"&gt;http://support.sas.com/kb/24/861.html&lt;/A&gt; but the&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the grid is not filled (only&amp;nbsp;has&amp;nbsp;wiremesh&amp;nbsp;output).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an easier way to generate 3D graphs surface plots with specific colours (eg rainbow)? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 17:17:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297802#M10535</guid>
      <dc:creator>amrit11</dc:creator>
      <dc:date>2016-09-12T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297806#M10536</link>
      <description>&lt;P&gt;Why could you not implement the code? Did you get any errors, if so provide them. No output? Wrong output?&lt;/P&gt;
&lt;P&gt;It will help to provide the version of SAS you are running, the exact code you submitted and log when running that code (especially if there are errors.)&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 17:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297806#M10536</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-12T17:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297844#M10537</link>
      <description>&lt;P&gt;With the code available on :&amp;nbsp;&lt;A href="http://support.sas.com/kb/24/861.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://support.sas.com/kb/24/861.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can not generate filled polygons. I only get a coloured&amp;nbsp;wiremesh&amp;nbsp;(lines grid) output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the code available on :&amp;nbsp;&lt;A href="http://www.datavis.ca/sasmac/surface.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.datavis.ca/sasmac/surface.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I get the same output even when I change&amp;nbsp;the data. I copy pasted the macro and tried to replace the data with my data but the output does not change. What are the steps that I should follow to get desired output using the code available on &lt;A href="http://www.datavis.ca/sasmac/surface.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www.datavis.ca/sasmac/surface.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Are there any simpler ways / alternatives to generating coloured 3D surface plots?&lt;/P&gt;&lt;P&gt;I would greatly appreciate&amp;nbsp;your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to plot a graph for the following data:&lt;/P&gt;&lt;P&gt;Longitude Latitude Yield&lt;/P&gt;&lt;P&gt;1 1 4.017916667&lt;BR /&gt;2 1 4.113095238&lt;BR /&gt;3 1 3.838888889&lt;BR /&gt;4 1 .&lt;BR /&gt;5 1 3.864285714&lt;BR /&gt;6 1 4.181597222&lt;BR /&gt;7 1 4.279947917&lt;BR /&gt;8 1 4.465570175&lt;BR /&gt;9 1 4.446626984&lt;BR /&gt;10 1 4.545643939&lt;BR /&gt;11 1 4.624583333&lt;BR /&gt;12 1 4.542763158&lt;BR /&gt;13 1 4.408991228&lt;BR /&gt;14 1 4.481359649&lt;BR /&gt;15 1 4.378472222&lt;BR /&gt;16 1 4.220343137&lt;BR /&gt;17 1 4.288235294&lt;BR /&gt;18 1 4.173529412&lt;BR /&gt;19 1 4.085185185&lt;BR /&gt;20 1 4.075925926&lt;BR /&gt;21 1 4.079960317&lt;BR /&gt;22 1 4.110416667&lt;BR /&gt;23 1 4.167613636&lt;BR /&gt;24 1 4.155324074&lt;BR /&gt;25 1 4.208055556&lt;BR /&gt;1 2 3.915625&lt;BR /&gt;2 2 3.931818182&lt;BR /&gt;3 2 3.736666667&lt;BR /&gt;4 2 3.739166667&lt;BR /&gt;5 2 3.788958333&lt;BR /&gt;6 2 4.006302083&lt;BR /&gt;7 2 4.130307018&lt;BR /&gt;8 2 4.311022727&lt;BR /&gt;9 2 4.333368056&lt;BR /&gt;10 2 4.459722222&lt;BR /&gt;11 2 4.521376812&lt;BR /&gt;12 2 4.465398551&lt;BR /&gt;13 2 4.341123188&lt;BR /&gt;14 2 4.415036232&lt;BR /&gt;15 2 4.327840909&lt;BR /&gt;16 2 4.222291667&lt;BR /&gt;17 2 4.290740741&lt;BR /&gt;18 2 4.215625&lt;BR /&gt;19 2 3.989583333&lt;BR /&gt;20 2 4.0125&lt;BR /&gt;21 2 4.002083333&lt;BR /&gt;22 2 4.070394737&lt;BR /&gt;23 2 4.098015873&lt;BR /&gt;24 2 4.143981481&lt;BR /&gt;25 2 4.158888889&lt;BR /&gt;1 3 4.005989583&lt;BR /&gt;2 3 3.970555556&lt;BR /&gt;3 3 3.776923077&lt;BR /&gt;4 3 3.819642857&lt;BR /&gt;5 3 3.871722222&lt;BR /&gt;6 3 3.967175926&lt;BR /&gt;7 3 4.061447368&lt;BR /&gt;8 3 4.276931818&lt;BR /&gt;9 3 4.257644928&lt;BR /&gt;10 3 4.397101449&lt;BR /&gt;11 3 4.507539683&lt;BR /&gt;12 3 4.49781746&lt;BR /&gt;13 3 4.31547619&lt;BR /&gt;14 3 4.498412698&lt;BR /&gt;15 3 4.499166667&lt;BR /&gt;16 3 4.388596491&lt;BR /&gt;17 3 4.470833333&lt;BR /&gt;18 3 4.442222222&lt;BR /&gt;19 3 4.142222222&lt;BR /&gt;20 3 4.054444444&lt;BR /&gt;21 3 4.019362745&lt;BR /&gt;22 3 4.10372807&lt;BR /&gt;23 3 4.154960317&lt;BR /&gt;24 3 4.189692982&lt;BR /&gt;25 3 4.24877451&lt;BR /&gt;1 4 3.890416667&lt;BR /&gt;2 4 3.894791667&lt;BR /&gt;3 4 3.756617647&lt;BR /&gt;4 4 3.794852941&lt;BR /&gt;5 4 3.807864583&lt;BR /&gt;6 4 3.970147059&lt;BR /&gt;7 4 4.064114583&lt;BR /&gt;8 4 4.27087963&lt;BR /&gt;9 4 4.254212963&lt;BR /&gt;10 4 4.424537037&lt;BR /&gt;11 4 4.370833333&lt;BR /&gt;12 4 4.33203125&lt;BR /&gt;13 4 4.078645833&lt;BR /&gt;14 4 4.220833333&lt;BR /&gt;15 4 4.236666667&lt;BR /&gt;16 4 4.189285714&lt;BR /&gt;17 4 4.247569444&lt;BR /&gt;18 4 4.29&lt;BR /&gt;19 4 3.99&lt;BR /&gt;20 4 3.886363636&lt;BR /&gt;21 4 3.903571429&lt;BR /&gt;22 4 4.057843137&lt;BR /&gt;23 4 4.150833333&lt;BR /&gt;24 4 4.187719298&lt;BR /&gt;25 4 4.240686275&lt;BR /&gt;1 5 3.856578947&lt;BR /&gt;2 5 3.781547619&lt;BR /&gt;3 5 3.685416667&lt;BR /&gt;4 5 3.692361111&lt;BR /&gt;5 5 3.684427083&lt;BR /&gt;6 5 3.740677083&lt;BR /&gt;7 5 3.86224359&lt;BR /&gt;8 5 4.039940476&lt;BR /&gt;9 5 4.073869048&lt;BR /&gt;10 5 4.334615385&lt;BR /&gt;11 5 4.341666667&lt;BR /&gt;12 5 4.264772727&lt;BR /&gt;13 5 3.95530303&lt;BR /&gt;14 5 4.021212121&lt;BR /&gt;15 5 3.9325&lt;BR /&gt;16 5 3.958333333&lt;BR /&gt;17 5 4.095833333&lt;BR /&gt;18 5 .&lt;BR /&gt;19 5 .&lt;BR /&gt;20 5 3.903125&lt;BR /&gt;21 5 3.960416667&lt;BR /&gt;22 5 4.022395833&lt;BR /&gt;23 5 4.128508772&lt;BR /&gt;24 5 4.14375&lt;BR /&gt;25 5 4.197058824&lt;BR /&gt;1 6 3.922794118&lt;BR /&gt;2 6 3.844078947&lt;BR /&gt;3 6 3.79921875&lt;BR /&gt;4 6 3.808611111&lt;BR /&gt;5 6 3.830833333&lt;BR /&gt;6 6 3.731893939&lt;BR /&gt;7 6 3.763645833&lt;BR /&gt;8 6 3.83712963&lt;BR /&gt;9 6 3.778796296&lt;BR /&gt;10 6 3.880208333&lt;BR /&gt;11 6 3.882142857&lt;BR /&gt;12 6 4.063095238&lt;BR /&gt;13 6 3.941071429&lt;BR /&gt;14 6 4.182738095&lt;BR /&gt;15 6 4.286309524&lt;BR /&gt;16 6 4.384027778&lt;BR /&gt;17 6 .&lt;BR /&gt;18 6 .&lt;BR /&gt;19 6 .&lt;BR /&gt;20 6 4.03125&lt;BR /&gt;21 6 4.060416667&lt;BR /&gt;22 6 4.180989583&lt;BR /&gt;23 6 4.261458333&lt;BR /&gt;24 6 4.321428571&lt;BR /&gt;25 6 4.370833333&lt;BR /&gt;1 7 3.957440476&lt;BR /&gt;2 7 3.844010417&lt;BR /&gt;3 7 3.798397436&lt;BR /&gt;4 7 3.843402778&lt;BR /&gt;5 7 3.873333333&lt;BR /&gt;6 7 3.705952381&lt;BR /&gt;7 7 .&lt;BR /&gt;8 7 .&lt;BR /&gt;9 7 .&lt;BR /&gt;10 7 .&lt;BR /&gt;11 7 .&lt;BR /&gt;12 7 .&lt;BR /&gt;13 7 .&lt;BR /&gt;14 7 .&lt;BR /&gt;15 7 .&lt;BR /&gt;16 7 4.292361111&lt;BR /&gt;17 7 4.461111111&lt;BR /&gt;18 7 4.388194444&lt;BR /&gt;19 7 4.59047619&lt;BR /&gt;20 7 4.427272727&lt;BR /&gt;21 7 4.301666667&lt;BR /&gt;22 7 4.35&lt;BR /&gt;23 7 4.439583333&lt;BR /&gt;24 7 4.444384058&lt;BR /&gt;25 7 4.466458333&lt;BR /&gt;1 8 3.81780303&lt;BR /&gt;2 8 3.761217949&lt;BR /&gt;3 8 3.706597222&lt;BR /&gt;4 8 3.685648148&lt;BR /&gt;5 8 3.64047619&lt;BR /&gt;6 8 .&lt;BR /&gt;7 8 .&lt;BR /&gt;8 8 .&lt;BR /&gt;9 8 .&lt;BR /&gt;10 8 .&lt;BR /&gt;11 8 .&lt;BR /&gt;12 8 .&lt;BR /&gt;13 8 .&lt;BR /&gt;14 8 .&lt;BR /&gt;15 8 .&lt;BR /&gt;16 8 .&lt;BR /&gt;17 8 .&lt;BR /&gt;18 8 .&lt;BR /&gt;19 8 4.5125&lt;BR /&gt;20 8 4.447569444&lt;BR /&gt;21 8 4.302864583&lt;BR /&gt;22 8 4.302083333&lt;BR /&gt;23 8 4.398611111&lt;BR /&gt;24 8 4.423484848&lt;BR /&gt;25 8 4.397685185&lt;BR /&gt;1 9 4.084722222&lt;BR /&gt;2 9 3.819791667&lt;BR /&gt;3 9 3.714583333&lt;BR /&gt;4 9 3.688888889&lt;BR /&gt;5 9 .&lt;BR /&gt;6 9 .&lt;BR /&gt;7 9 .&lt;BR /&gt;8 9 .&lt;BR /&gt;9 9 .&lt;BR /&gt;10 9 .&lt;BR /&gt;11 9 .&lt;BR /&gt;12 9 .&lt;BR /&gt;13 9 .&lt;BR /&gt;14 9 .&lt;BR /&gt;15 9 .&lt;BR /&gt;16 9 4.40952381&lt;BR /&gt;17 9 4.4890625&lt;BR /&gt;18 9 4.4453125&lt;BR /&gt;19 9 4.582954545&lt;BR /&gt;20 9 4.521388889&lt;BR /&gt;21 9 4.419212963&lt;BR /&gt;22 9 4.346710526&lt;BR /&gt;23 9 4.393849206&lt;BR /&gt;24 9 4.378030303&lt;BR /&gt;25 9 4.343859649&lt;BR /&gt;1 10 .&lt;BR /&gt;2 10 .&lt;BR /&gt;3 10 3.831944444&lt;BR /&gt;4 10 .&lt;BR /&gt;5 10 .&lt;BR /&gt;6 10 .&lt;BR /&gt;7 10 .&lt;BR /&gt;8 10 .&lt;BR /&gt;9 10 .&lt;BR /&gt;10 10 .&lt;BR /&gt;11 10 .&lt;BR /&gt;12 10 .&lt;BR /&gt;13 10 .&lt;BR /&gt;14 10 .&lt;BR /&gt;15 10 .&lt;BR /&gt;16 10 4.258333333&lt;BR /&gt;17 10 4.37125&lt;BR /&gt;18 10 4.455113636&lt;BR /&gt;19 10 4.58375&lt;BR /&gt;20 10 4.548135965&lt;BR /&gt;21 10 4.497916667&lt;BR /&gt;22 10 4.45109127&lt;BR /&gt;23 10 4.453804348&lt;BR /&gt;24 10 4.426086957&lt;BR /&gt;25 10 4.388333333&lt;BR /&gt;1 11 .&lt;BR /&gt;2 11 .&lt;BR /&gt;3 11 .&lt;BR /&gt;4 11 .&lt;BR /&gt;5 11 .&lt;BR /&gt;6 11 .&lt;BR /&gt;7 11 .&lt;BR /&gt;8 11 .&lt;BR /&gt;9 11 .&lt;BR /&gt;10 11 .&lt;BR /&gt;11 11 .&lt;BR /&gt;12 11 .&lt;BR /&gt;13 11 .&lt;BR /&gt;14 11 4.201388889&lt;BR /&gt;15 11 4.24047619&lt;BR /&gt;16 11 4.23030303&lt;BR /&gt;17 11 4.300892857&lt;BR /&gt;18 11 4.448828125&lt;BR /&gt;19 11 4.596820175&lt;BR /&gt;20 11 4.60217803&lt;BR /&gt;21 11 4.577807971&lt;BR /&gt;22 11 4.530018939&lt;BR /&gt;23 11 4.517028986&lt;BR /&gt;24 11 4.428030303&lt;BR /&gt;25 11 4.390740741&lt;BR /&gt;1 12 .&lt;BR /&gt;2 12 .&lt;BR /&gt;3 12 .&lt;BR /&gt;4 12 .&lt;BR /&gt;5 12 .&lt;BR /&gt;6 12 .&lt;BR /&gt;7 12 .&lt;BR /&gt;8 12 .&lt;BR /&gt;9 12 .&lt;BR /&gt;10 12 .&lt;BR /&gt;11 12 .&lt;BR /&gt;12 12 .&lt;BR /&gt;13 12 .&lt;BR /&gt;14 12 4.568055556&lt;BR /&gt;15 12 4.554761905&lt;BR /&gt;16 12 4.278030303&lt;BR /&gt;17 12 4.266071429&lt;BR /&gt;18 12 4.42125&lt;BR /&gt;19 12 4.459143519&lt;BR /&gt;20 12 4.467757937&lt;BR /&gt;21 12 4.485890152&lt;BR /&gt;22 12 4.433630952&lt;BR /&gt;23 12 4.435119048&lt;BR /&gt;24 12 4.372368421&lt;BR /&gt;25 12 4.336111111&lt;BR /&gt;1 13 .&lt;BR /&gt;2 13 .&lt;BR /&gt;3 13 .&lt;BR /&gt;4 13 .&lt;BR /&gt;5 13 .&lt;BR /&gt;6 13 .&lt;BR /&gt;7 13 .&lt;BR /&gt;8 13 .&lt;BR /&gt;9 13 .&lt;BR /&gt;10 13 .&lt;BR /&gt;11 13 .&lt;BR /&gt;12 13 .&lt;BR /&gt;13 13 .&lt;BR /&gt;14 13 .&lt;BR /&gt;15 13 4.547222222&lt;BR /&gt;16 13 4.245833333&lt;BR /&gt;17 13 4.19375&lt;BR /&gt;18 13 4.394196429&lt;BR /&gt;19 13 4.373651961&lt;BR /&gt;20 13 4.355104167&lt;BR /&gt;21 13 4.362797619&lt;BR /&gt;22 13 4.264109848&lt;BR /&gt;23 13 4.21984127&lt;BR /&gt;24 13 4.187037037&lt;BR /&gt;25 13 4.15297619&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 19:43:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297844#M10537</guid>
      <dc:creator>amrit11</dc:creator>
      <dc:date>2016-09-12T19:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297870#M10538</link>
      <description>&lt;P&gt;Did you find the actual Surface macro definition code. This would have code that somewhere has %macro surface (); and a %mend statement to end it. When I looked at that weblink I only see instructions to use the macro Surface but no source code.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 22:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297870#M10538</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-12T22:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297893#M10539</link>
      <description>&lt;P&gt;The Source Code is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; /*-----------------------------------------------------------------*
  *    Name: surface.sas                                            *
  *   Title: Draw color 3D surface plot with contours in X-Y plane  *
        Doc: http://www.datavis.ca/sasmac/surface.html        
  *-----------------------------------------------------------------*
  * Original author: Russ Wolfinger                                 *
  *  Author:  Michael Friendly            &amp;lt;friendly@yorku.ca&amp;gt;       *
  * Created: 26 Oct 2006 09:59:00                                   *
  * Revised: 26 Oct 2006 09:59:00                                   *
  * Version: 1.0                                                    *
  *                                                                 *
  *-----------------------------------------------------------------*/
 /*=
=Description:
 
 The SURFACE macro draws a 3D color-coded surface plot, showing a contour
 plot in the X-Y plane.  The result is most useful for smooth surfaces, e.g.,
 for functional relations, Z=f(X,Y), bivariate density estimates computed
 with PROC KDE, or with the result of PROC G3GRID.

==Method:

 The surface and the contour plot are constructed using filled polygons
 in Annotate datasets.  The contour is identical to the surface, with the
 Z coordinate set to the constant 'floor'. 
 
=Usage:

 The SURFACE macro is defined with keyword parameters.  The X=, Y= and
 Z= parameters are required.
 The arguments may be listed within parentheses in any order, separated
 by commas. For example: 
 
	%surface(x=temperature, y=pressure, z=yield);
 
==Parameters:

* DATA=       The name of the input data set [Default: DATA=_LAST_]

* X=          X variable for plot [Default: X=X]

* Y=          Y variable for plot [Default: Y=Y]

* Z=          Z variable for plot [Default: Z=Z]

* WHERE=      Where clause to subset the data

* COLORS=     Color scheme (HLS|HLSllss) or list of colors. COLORS=HLS generates 
              NLEVELS= colors varying in hue in the HLS color scheme Hhhh80FF.
              COLORS=HLSllss, where llss are hex digits, generates HLS colors
			  with lightness ll and saturations ss.  Otherwise, COLORS= is taken
			  as a blank separated list of SAS colors of length NLEVELS=.
			  [Default: COLORS=HLS]

* NLEVELS=    Number of levels for color [Default: NLEVELS=12]

* TICKNUM=    Number of tick marks on axes.  Specify 1-3 values, for X, Y and Z. [Default: TICKNUM=5]

* DROP=       Amount to drop contour plot beneath lowest z-value, in data units. [Default: DROP=1]

* TILT=       G3D TILT= value(s): One or more numbers giving the number of degrees
              to tilt the plot. [Default: TILT=75]

* ROTATE=     G3D ROTATE= value(s): One or more numbers giving the number of degrees
              to rotate the plot. [Default: ROTATE=40]

* FUZZ=       Fuzz value for binning X, Y [Default: FUZZ=1E-6]

* OPTIONS=    REVERSE and/or NOGRID.  When COLORS=HLS, OPTIONS=REVERSE reverses the
              assignment of colors to heights (Z= values) in the plot.

* ANNO=       Additional input annotate data set

* OUTANNO=    Output annotate data set used with G3D [Default: OUTANNO=SURFANNO]

* GOUT=       The name of the graphics catalog [Default: GOUT=GSEG]

* NAME=       The name of the graph in the graphic catalog [Default: NAME=SURFACE]
                
=Example:

   *-- Generate bivariate normal data;
   data bivar;
	  do i = 1 to 10000;
    	 x = rannor(2140);
    	 y = -x + 3* rannor(2140);
    	 output;
	  end;
   run;

   *-- Do bivariate density estimation;
   proc kde data=bivar out=kdeout;
	  var x y;
   run;

   %include macros(surface);
   %surface(data=kdeout, x=x, y=y, z=density,
       where=-3&amp;lt;x&amp;lt;3)


 =*/

 /*---
 Title: Draw color 3D surface plot with contours in X-Y plane
 
 macro to draw color surface plot with contours underneath,
      code modified from Example 6 in SAS/GRAPH Examples book,
      version 6, supported by Russ Wolfinger (sasrdw@unx.sas.com)---
 ---*/

%macro surface(
  data=,             /* name of input data set */
  x=x,               /* X variable for plot                                */
  y=y,               /* Y variable for plot                                */
  z=z,               /* Z variable for plot                                */
  where=,            /* where clause to subset the data                    */
  colors=HLS,        /* color scheme (HLS) or list of colors               */
  nlevels=12,        /* number of levels for color                         */
  ticknum=5,         /* number of tick marks on axes                       */
  drop=1,            /* amount to drop contour plot beneath lowest z-value */
  tilt=75,           /* G3D TILT= value                                    */
  rotate=40,         /* G3D ROTATE= value                                  */
  scatopt=,          /* Any other options for the G3D SCATTER stmt         */
  fuzz=1e-6,         /* fuzz value for binning X, Y                        */
  options=,          /* REVERSE and/or NOGRID                              */
  anno=,             /* additional input annotate data set                 */
  outanno=surfanno,  /* output annotate data set used with G3D             */
  gout=gseg,         /* name of output graphic catalog                     */
  name=surface       /* name of graphic catalog entry                      */
  );

 /*---default data set---*/
 %if %bquote(&amp;amp;data)= %then %let data=&amp;amp;syslast;

 %local me; %let me=&amp;amp;sysmacroname;
 %if (%length(&amp;amp;x)=0 or %length(&amp;amp;y)=0 or %length(&amp;amp;z)=0 )
 	%then %do;
		%put ERROR: (&amp;amp;me) You must supply X=, Y= and Z= variable names;
		%goto DONE;
	%end;

 %let options = %qupcase(&amp;amp;options);

 %*-- Parse COLORS=HLS or COLORS=HLSllss;
 %let colors  = %qupcase(&amp;amp;colors);
 %if %substr(&amp;amp;colors,1,3) = HLS %then %do;
 	%if %length(&amp;amp;colors) = 3
		%then %let llss=80FF;
		%else %let llss=%substr(&amp;amp;colors,4);
	%let colors=HLS;
 	%end;
	

 %let xtick = %scan(&amp;amp;ticknum &amp;amp;ticknum &amp;amp;ticknum, 1);
 %let ytick = %scan(&amp;amp;ticknum &amp;amp;ticknum &amp;amp;ticknum, 2);
 %let ztick = %scan(&amp;amp;ticknum &amp;amp;ticknum &amp;amp;ticknum, 3);
 
 options nonotes;
 /*---compute ranges for the three coordinates---*/
 proc means data=&amp;amp;data noprint min max;
    %if %length(&amp;amp;where) %then %do;
       where &amp;amp;where;
    %end;
    var &amp;amp;x &amp;amp;y &amp;amp;z;
    output out=_range
       min=xmin ymin zmin
       max=xmax ymax zmax;
 run;

 /*---set up macro variables for the ranges---*/
 %local xmin xmax ymin ymax zmin zmax floor ceil zstep;
 data _null_;
    set _range;
    call symput('xmin', put(xmin,best.));
    call symput('xmax', put(xmax,best.));
    call symput('ymin', put(ymin,best.));
    call symput('ymax', put(ymax,best.));
    call symput('zmin', put(zmin,best.));
    call symput('zmax', put(zmax,best.));
    zrange = zmax - zmin;
    call symput('floor',put((zmin-(&amp;amp;drop)*zrange),best.));
    call symput('ceil',put(zmax,best.));
    call symput('zstep',put(zrange/&amp;amp;nlevels,best.));
 run;

 /*---determine step sizes for x and y---*/
 proc sort data=&amp;amp;data out=_xgrid nodupkey;
    by &amp;amp;x;
 run;

 data _xgrid;
    set _xgrid;
    keep &amp;amp;x xstep;
    xstep = &amp;amp;x - lag(&amp;amp;x);
    if (_n_ = 2) then do;
       call symput('xstep',put(xstep,best.));
    end;
 run;

 proc sort data=&amp;amp;data out=_ygrid nodupkey;
    by &amp;amp;y;
 run;

 data _ygrid;
    set _ygrid;
    keep &amp;amp;y ystep;
    ystep = &amp;amp;y - lag(&amp;amp;y);
    if (_n_ = 2) then do;
       call symput('ystep',put(ystep,best.));
    end;
 run;

 data _null_;
    set _ygrid nobs=count;
    call symput('ny',put(count,best.));
 run;

 %*-- Nested macro for color computation;
 %macro surcolor(arg);
	   %if &amp;amp;colors = HLS %then %do;
	    	length hue $3;
    	   %if %index(&amp;amp;options,REVERSE) %then %do;
        	  deg = round((&amp;amp;arg)*320,2) + 120;
    	   %end;
    	   %else %do;
        	  deg = 440 - round((&amp;amp;arg)*320,2);
    	   %end;
    	   hue = put(deg,$hex3.);
    	   color = 'H'||hue||"&amp;amp;llss";
		   drop hue;
           %end;
		%else %do;
			color = scan("&amp;amp;colors", ncol);
			%end;
 %mend;
 
 /*---create annotate data set for legend---*/
 data _legend;
    length function color $ 8;
    retain xsys ysys zsys '2';
    drop legend ncol;
    do legend = &amp;amp;zmin to (&amp;amp;zmax-&amp;amp;zstep) by &amp;amp;zstep;
       x = &amp;amp;xmin; 
       y = &amp;amp;ymax; 
       z = legend;
       function = 'poly'; 
       style = 'solid';
       ncol = min(&amp;amp;nlevels,int(1+(legend+(&amp;amp;zstep/2)-&amp;amp;zmin)/&amp;amp;zstep));
	   %surcolor(ncol/&amp;amp;nlevels);
	   /*
	   %if &amp;amp;colors=HLS %then %do;
    	   %if %index(&amp;amp;options,REVERSE) %then %do;
        	  deg = round((ncol/&amp;amp;nlevels)*320,2) + 120;
    	   %end;
    	   %else %do;
        	  deg = 440 - round((ncol/&amp;amp;nlevels)*320,2);
    	   %end;
    	   hue = put(deg,$hex3.);
    	   color = 'H'||hue||"&amp;amp;llss";
           %end;
		%else %do;
			color = scan(&amp;amp;colors, ncol);
			%end;
		*/
       output;
       z = legend + &amp;amp;zstep;
       function = 'polycont'; 
       %if not %index(&amp;amp;options,NOGRID) %then %do;
          color = 'black';
       %end;
       output;
       x = &amp;amp;xmin + (&amp;amp;xmax-&amp;amp;xmin)*.05; 
       output;
       z = legend; 
       output;
    end;
 run;

 /*---create annotate data sets for plane and surface; sort by
      the sum of coordinates so graphs will be drawn from
      back to front---*/
 data _zval;
    set &amp;amp;data;
    %if %length(&amp;amp;where) %then %do;
       where &amp;amp;where;
    %end;
    x = &amp;amp;x;
    y = &amp;amp;y;
    z = &amp;amp;z;
    keep x y z;
 run;

 proc sort data=_zval;
    by x y;
 run;

 data _surface;
    set &amp;amp;data;
    %if %length(&amp;amp;where) %then %do;
       where &amp;amp;where;
    %end;
    sum = (&amp;amp;x - &amp;amp;xmin)/&amp;amp;xstep + (&amp;amp;y - &amp;amp;ymin)/&amp;amp;ystep;
    keep &amp;amp;x &amp;amp;y &amp;amp;z sum;
 run;

 proc sort data=_surface;
    by descending sum;
 run;

 /*---draw 4-sided polygons counter-clockwise---*/
 data _surface;
    set _surface;
    length function color $ 8;
    retain xsys ysys zsys '2';
    /* drop &amp;amp;x &amp;amp;y &amp;amp;z; */
    x = &amp;amp;x; 
    y = &amp;amp;y; 
    if (abs(x-&amp;amp;xmin) &amp;lt; &amp;amp;fuzz*&amp;amp;xstep) or 
       (abs(y-&amp;amp;ymin) &amp;lt; &amp;amp;fuzz*&amp;amp;ystep) then delete;
    function = 'poly';
    style = 'solid';
	%*surcolor;
    ncol=min(&amp;amp;nlevels,int(1+(&amp;amp;z-&amp;amp;zmin+&amp;amp;fuzz*&amp;amp;zstep)/&amp;amp;zstep));
	%surcolor((&amp;amp;z-&amp;amp;zmin+&amp;amp;fuzz*&amp;amp;zstep)/&amp;amp;zstep/&amp;amp;nlevels);

/*	
	%if &amp;amp;colors=HLS %then %do;
    	%if %index(&amp;amp;options,REVERSE) %then %do;
    	   deg = round(((&amp;amp;z-&amp;amp;zmin+&amp;amp;fuzz*&amp;amp;zstep)/&amp;amp;zstep/&amp;amp;nlevels)*320,2) + 120;
    	%end;
    	%else %do;
    	   deg = 440 - round(((&amp;amp;z-&amp;amp;zmin+&amp;amp;fuzz*&amp;amp;zstep)/&amp;amp;zstep/&amp;amp;nlevels)* 320,2);
    	%end;
    	hue = put(deg,$hex3.);
    	color = 'H'||hue||'80FF';
		%end;
		%else %do;
			color = scan("&amp;amp;colors", ncol);
			%end;
*/	
    when = 'A';
    idx = &amp;amp;ny*(x-&amp;amp;xmin+&amp;amp;fuzz*&amp;amp;xstep)/(&amp;amp;xstep) + 
              (y-&amp;amp;ymin+&amp;amp;fuzz*&amp;amp;ystep)/(&amp;amp;ystep) + 1;
    index = idx;
    set _zval point=idx;
    output;
    function = 'polycont'; 
    %if not %index(&amp;amp;options,NOGRID) %then %do;
       color = 'black';
    %end;
    x = x - &amp;amp;xstep;
    idx = &amp;amp;ny*(x-&amp;amp;xmin+&amp;amp;fuzz*&amp;amp;xstep)/(&amp;amp;xstep) + 
              (y-&amp;amp;ymin+&amp;amp;fuzz*&amp;amp;ystep)/(&amp;amp;ystep) + 1;
    index = idx;
    set _zval point=idx;
    output;
    y = y - &amp;amp;ystep;
    idx = &amp;amp;ny*(x-&amp;amp;xmin+&amp;amp;fuzz*&amp;amp;xstep)/(&amp;amp;xstep) + 
              (y-&amp;amp;ymin+&amp;amp;fuzz*&amp;amp;ystep)/(&amp;amp;ystep) + 1;
    index = idx;
    set _zval point=idx;
    output;
    x = x + &amp;amp;xstep;
    idx = &amp;amp;ny*(x-&amp;amp;xmin+&amp;amp;fuzz*&amp;amp;xstep)/(&amp;amp;xstep) + 
              (y-&amp;amp;ymin+&amp;amp;fuzz*&amp;amp;ystep)/(&amp;amp;ystep) + 1;
    index = idx;
    set _zval point=idx;
    output;
 run;

 options notes;
 data _plane;
    set _surface;
    z = &amp;amp;floor;
 run;

 /*---merge annotate data sets---*/
 data &amp;amp;outanno;
    set _legend _plane _surface &amp;amp;anno;
 run;

 /*---create input data set for PROC G3D---*/
 data _plot;
    &amp;amp;x = &amp;amp;xmin; 
    &amp;amp;y = &amp;amp;ymin; 
    &amp;amp;z = &amp;amp;floor; 
    output;
    &amp;amp;x = &amp;amp;xmax; 
    &amp;amp;y = &amp;amp;ymax; 
    output;
 run;

 /*---draw the surface and contours---*/
 proc g3d data=_plot gout=&amp;amp;gout ;
    scatter &amp;amp;y*&amp;amp;x=&amp;amp;z  / 
	 %if %length(&amp;amp;rotate) %then %do;
       rotate=&amp;amp;rotate %end; 
	 %if %length(&amp;amp;tilt) %then %do;
       tilt=&amp;amp;tilt %end; 
	 xticknum=&amp;amp;xtick yticknum=&amp;amp;ytick zticknum=&amp;amp;ztick 
	 shape='point' 
     zmin=&amp;amp;floor zmax=&amp;amp;ceil 
	 annotate=&amp;amp;outanno  &amp;amp;scatopt 
	 name="&amp;amp;name" des="Surface plot of &amp;amp;y*&amp;amp;x=&amp;amp;z"
	   ;
 run;

  *-- Clean up datasets no longer needed;
proc datasets nofs nolist nowarn library=work memtype=(data);
    delete _xgrid _ygrid  _zval _range _legend _plane _surface _plot;
	run; quit;

%done:

%mend surface;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 02:28:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/297893#M10539</guid>
      <dc:creator>amrit11</dc:creator>
      <dc:date>2016-09-13T02:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298057#M10549</link>
      <description>&lt;P&gt;When I create a data set named have from your example data and call the macro using:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;%&lt;/FONT&gt;&lt;FONT color="#bf0060" face="SAS Monospace" size="2"&gt;surface&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;(data=have,x=longitude,y=latitude,z=yield);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;I get the result in the attachment.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;Not pretty but not just the wire frame.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;Do you get any messages in the log about color assignments? What is your active ODS Style or destination? You may have something that doesn't support color such a the Journal styles.&lt;/FONT&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12973iEDD97C239B3FA717/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="surface.png" title="surface.png" /&gt;</description>
      <pubDate>Tue, 13 Sep 2016 14:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298057#M10549</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-13T14:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298065#M10550</link>
      <description>&lt;P&gt;You can also use GTL to render the surface:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
  define statgraph surface;
    begingraph;
      entrytitle 'Yield Data';
      layout overlay3d;
        surfaceplotparm x=Latitude y=Longitude z=yield / surfacetype=fillgrid colorresponse=yield
                        colormodel=(green yellow red);
          endlayout;
    endgraph;
  end;
run;

ods graphics / width=640px height=640px;
proc sgrender data=surface_data template=surface;
run;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12974iBB821A4A3FA30227/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Surface.png" title="Surface.png" /&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298065#M10550</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-09-13T15:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298066#M10551</link>
      <description>&lt;P&gt;Sewe the article &lt;A href="http://blogs.sas.com/content/iml/2015/10/12/create-surface-plot-sas.html" target="_self"&gt;"Create a surface plot in SAS"&lt;/A&gt;&amp;nbsp;for an example and discussion.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298066#M10551</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-09-13T15:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298071#M10552</link>
      <description>&lt;P&gt;Thanks Ballard.... this is amazing,&lt;/P&gt;&lt;P&gt;The graph is quite close to what I want.&lt;/P&gt;&lt;P&gt;Did you only change "&lt;FONT face="SAS Monospace" size="2"&gt;%&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2" color="#bf0060"&gt;surface&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;(data=have,x=longitude,y=latitude,z=yield);&lt;/FONT&gt;" in the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to make several graphs keeping the colour scale values constant; I am not sure which part of the code should be changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also can we smoothen the surface to make it look better (something similar to the surface plot shown in the link :&amp;nbsp;&lt;A href="https://support.sas.com/rnd/datavisualization/yourGraphs/technologies/Java.html" target="_blank"&gt;https://support.sas.com/rnd/datavisualization/yourGraphs/technologies/Java.html&lt;/A&gt; (or &lt;A href="http://tex.stackexchange.com/questions/39889/tikz-how-to-get-a-few-smooth-grid-lines-for-surface-plots)&amp;nbsp;" target="_blank"&gt;http://tex.stackexchange.com/questions/39889/tikz-how-to-get-a-few-smooth-grid-lines-for-surface-plots)&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298071#M10552</guid>
      <dc:creator>amrit11</dc:creator>
      <dc:date>2016-09-13T15:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298072#M10553</link>
      <description>&lt;P&gt;Thanks DanH&lt;/P&gt;&lt;P&gt;Is there a way to keep the colour scale constant for several graphs.&lt;/P&gt;&lt;P&gt;Can we smoothen the surface and&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we have more than three colours?&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298072#M10553</guid>
      <dc:creator>amrit11</dc:creator>
      <dc:date>2016-09-13T15:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298075#M10554</link>
      <description>&lt;P&gt;Yes but are the colour options not limited beyond threecolouramp.&amp;nbsp;I want to make several graphs based on fixed colour values.&lt;/P&gt;&lt;P&gt;Thank you Rick&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298075#M10554</guid>
      <dc:creator>amrit11</dc:creator>
      <dc:date>2016-09-13T15:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298093#M10555</link>
      <description>&lt;P&gt;Yes... on all counts &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FIrst look at the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
  define statgraph surface;
    begingraph;
      entrytitle 'Yield Data';
      rangeattrmap name="yield_map";
        range 3.0-5.0 / rangecolormodel=(green yellow red purple);
      endrangeattrmap;
      rangeattrvar attrvar=yieldvar var=yield attrmap="yield_map";
      layout overlay3d;
        surfaceplotparm x=Latitude y=Longitude z=yield / surfacetype=fillgrid
                        colorresponse=yieldvar name="surface";
        continuouslegend "surface";
          endlayout;
    endgraph;
  end;
run;

ods graphics / width=640px height=640px;
proc g3grid data=surface_data out=gridded;
  grid Longitude*Latitude=Yield / spline
               axis1=0 to 25 by 5
               axis2=0 to 15 by 2.5;
run;
proc sort data=gridded; by Longitude Latitude; run;

proc sgrender data=gridded template=surface;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The RANGEATTRMAP is defining a mapping where the yields between 3.0 and 5.0 are mapped to a smooth gradient between four colors (you could add more). You could also break down this mapping such that specific ranges get a specific color (see the RANGEATTRMAP documentation). This mapping will give you your consistent colors from one run to the next. Tweak this to your specific needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The smoothing of the surface data is done using PROC G3GRID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 16:27:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298093#M10555</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-09-13T16:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298163#M10559</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/74907"&gt;@amrit11&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The graph is quite close to what I want.&lt;/P&gt;
&lt;P&gt;Did you only change "&lt;FONT face="SAS Monospace" size="2"&gt;%&lt;/FONT&gt;&lt;FONT color="#bf0060" face="SAS Monospace" size="2"&gt;surface&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;(data=have,x=longitude,y=latitude,z=yield);&lt;/FONT&gt;" in the code?&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;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;You didn't show the code you actually ran but the general use of a macro requires "compiling" the macro code by executing the code from the %macro statement to the corresponding %mend. Then Call the macro using the macro name with a percent sign: %surface.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspecth you may not have quite understood how to use the parameters to indicate the data set and variables. The parameter followed by equal sign is referred to as KEYWORD parameter which has the advantage of not requiring a specific order.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;%&lt;/FONT&gt;&lt;FONT color="#bf0060" face="SAS Monospace" size="2"&gt;surface&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;(data=have,z=yield,x=longitude,y=latitude); &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;would work exactly the same. Also the author of a macro can specify default values for those that don't change very often.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 22:05:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298163#M10559</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-13T22:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298182#M10561</link>
      <description>&lt;P&gt;Thanks DanH,&lt;/P&gt;&lt;P&gt;The code works, but the aspect ratio of the longitude and latitude is not maintained, it appears square instead of a rectangular block (of 25 * 13 : longitude * latitude).&lt;/P&gt;&lt;P&gt;Also the result is a mirror image of what is expected, should I reverse the axis in my raw data?&lt;/P&gt;&lt;P&gt;My code is as below, and output is attached.&lt;/P&gt;&lt;P&gt;Thank you again for the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data surface_data;&lt;BR /&gt;input longitude latitude yield;&lt;BR /&gt;datalines;&lt;BR /&gt;1 1 4.017916667&lt;BR /&gt;2 1 4.113095238&lt;BR /&gt;3 1 3.838888889&lt;BR /&gt;4 1 .&lt;BR /&gt;5 1 3.864285714&lt;BR /&gt;6 1 4.181597222&lt;BR /&gt;7 1 4.279947917&lt;BR /&gt;8 1 4.465570175&lt;BR /&gt;9 1 4.446626984&lt;BR /&gt;10 1 4.545643939&lt;BR /&gt;11 1 4.624583333&lt;BR /&gt;12 1 4.542763158&lt;BR /&gt;13 1 4.408991228&lt;BR /&gt;14 1 4.481359649&lt;BR /&gt;15 1 4.378472222&lt;BR /&gt;16 1 4.220343137&lt;BR /&gt;17 1 4.288235294&lt;BR /&gt;18 1 4.173529412&lt;BR /&gt;19 1 4.085185185&lt;BR /&gt;20 1 4.075925926&lt;BR /&gt;21 1 4.079960317&lt;BR /&gt;22 1 4.110416667&lt;BR /&gt;23 1 4.167613636&lt;BR /&gt;24 1 4.155324074&lt;BR /&gt;25 1 4.208055556&lt;BR /&gt;1 2 3.915625&lt;BR /&gt;2 2 3.931818182&lt;BR /&gt;3 2 3.736666667&lt;BR /&gt;4 2 3.739166667&lt;BR /&gt;5 2 3.788958333&lt;BR /&gt;6 2 4.006302083&lt;BR /&gt;7 2 4.130307018&lt;BR /&gt;8 2 4.311022727&lt;BR /&gt;9 2 4.333368056&lt;BR /&gt;10 2 4.459722222&lt;BR /&gt;11 2 4.521376812&lt;BR /&gt;12 2 4.465398551&lt;BR /&gt;13 2 4.341123188&lt;BR /&gt;14 2 4.415036232&lt;BR /&gt;15 2 4.327840909&lt;BR /&gt;16 2 4.222291667&lt;BR /&gt;17 2 4.290740741&lt;BR /&gt;18 2 4.215625&lt;BR /&gt;19 2 3.989583333&lt;BR /&gt;20 2 4.0125&lt;BR /&gt;21 2 4.002083333&lt;BR /&gt;22 2 4.070394737&lt;BR /&gt;23 2 4.098015873&lt;BR /&gt;24 2 4.143981481&lt;BR /&gt;25 2 4.158888889&lt;BR /&gt;1 3 4.005989583&lt;BR /&gt;2 3 3.970555556&lt;BR /&gt;3 3 3.776923077&lt;BR /&gt;4 3 3.819642857&lt;BR /&gt;5 3 3.871722222&lt;BR /&gt;6 3 3.967175926&lt;BR /&gt;7 3 4.061447368&lt;BR /&gt;8 3 4.276931818&lt;BR /&gt;9 3 4.257644928&lt;BR /&gt;10 3 4.397101449&lt;BR /&gt;11 3 4.507539683&lt;BR /&gt;12 3 4.49781746&lt;BR /&gt;13 3 4.31547619&lt;BR /&gt;14 3 4.498412698&lt;BR /&gt;15 3 4.499166667&lt;BR /&gt;16 3 4.388596491&lt;BR /&gt;17 3 4.470833333&lt;BR /&gt;18 3 4.442222222&lt;BR /&gt;19 3 4.142222222&lt;BR /&gt;20 3 4.054444444&lt;BR /&gt;21 3 4.019362745&lt;BR /&gt;22 3 4.10372807&lt;BR /&gt;23 3 4.154960317&lt;BR /&gt;24 3 4.189692982&lt;BR /&gt;25 3 4.24877451&lt;BR /&gt;1 4 3.890416667&lt;BR /&gt;2 4 3.894791667&lt;BR /&gt;3 4 3.756617647&lt;BR /&gt;4 4 3.794852941&lt;BR /&gt;5 4 3.807864583&lt;BR /&gt;6 4 3.970147059&lt;BR /&gt;7 4 4.064114583&lt;BR /&gt;8 4 4.27087963&lt;BR /&gt;9 4 4.254212963&lt;BR /&gt;10 4 4.424537037&lt;BR /&gt;11 4 4.370833333&lt;BR /&gt;12 4 4.33203125&lt;BR /&gt;13 4 4.078645833&lt;BR /&gt;14 4 4.220833333&lt;BR /&gt;15 4 4.236666667&lt;BR /&gt;16 4 4.189285714&lt;BR /&gt;17 4 4.247569444&lt;BR /&gt;18 4 4.29&lt;BR /&gt;19 4 3.99&lt;BR /&gt;20 4 3.886363636&lt;BR /&gt;21 4 3.903571429&lt;BR /&gt;22 4 4.057843137&lt;BR /&gt;23 4 4.150833333&lt;BR /&gt;24 4 4.187719298&lt;BR /&gt;25 4 4.240686275&lt;BR /&gt;1 5 3.856578947&lt;BR /&gt;2 5 3.781547619&lt;BR /&gt;3 5 3.685416667&lt;BR /&gt;4 5 3.692361111&lt;BR /&gt;5 5 3.684427083&lt;BR /&gt;6 5 3.740677083&lt;BR /&gt;7 5 3.86224359&lt;BR /&gt;8 5 4.039940476&lt;BR /&gt;9 5 4.073869048&lt;BR /&gt;10 5 4.334615385&lt;BR /&gt;11 5 4.341666667&lt;BR /&gt;12 5 4.264772727&lt;BR /&gt;13 5 3.95530303&lt;BR /&gt;14 5 4.021212121&lt;BR /&gt;15 5 3.9325&lt;BR /&gt;16 5 3.958333333&lt;BR /&gt;17 5 4.095833333&lt;BR /&gt;18 5 .&lt;BR /&gt;19 5 .&lt;BR /&gt;20 5 3.903125&lt;BR /&gt;21 5 3.960416667&lt;BR /&gt;22 5 4.022395833&lt;BR /&gt;23 5 4.128508772&lt;BR /&gt;24 5 4.14375&lt;BR /&gt;25 5 4.197058824&lt;BR /&gt;1 6 3.922794118&lt;BR /&gt;2 6 3.844078947&lt;BR /&gt;3 6 3.79921875&lt;BR /&gt;4 6 3.808611111&lt;BR /&gt;5 6 3.830833333&lt;BR /&gt;6 6 3.731893939&lt;BR /&gt;7 6 3.763645833&lt;BR /&gt;8 6 3.83712963&lt;BR /&gt;9 6 3.778796296&lt;BR /&gt;10 6 3.880208333&lt;BR /&gt;11 6 3.882142857&lt;BR /&gt;12 6 4.063095238&lt;BR /&gt;13 6 3.941071429&lt;BR /&gt;14 6 4.182738095&lt;BR /&gt;15 6 4.286309524&lt;BR /&gt;16 6 4.384027778&lt;BR /&gt;17 6 .&lt;BR /&gt;18 6 .&lt;BR /&gt;19 6 .&lt;BR /&gt;20 6 4.03125&lt;BR /&gt;21 6 4.060416667&lt;BR /&gt;22 6 4.180989583&lt;BR /&gt;23 6 4.261458333&lt;BR /&gt;24 6 4.321428571&lt;BR /&gt;25 6 4.370833333&lt;BR /&gt;1 7 3.957440476&lt;BR /&gt;2 7 3.844010417&lt;BR /&gt;3 7 3.798397436&lt;BR /&gt;4 7 3.843402778&lt;BR /&gt;5 7 3.873333333&lt;BR /&gt;6 7 3.705952381&lt;BR /&gt;7 7 .&lt;BR /&gt;8 7 .&lt;BR /&gt;9 7 .&lt;BR /&gt;10 7 .&lt;BR /&gt;11 7 .&lt;BR /&gt;12 7 .&lt;BR /&gt;13 7 .&lt;BR /&gt;14 7 .&lt;BR /&gt;15 7 .&lt;BR /&gt;16 7 4.292361111&lt;BR /&gt;17 7 4.461111111&lt;BR /&gt;18 7 4.388194444&lt;BR /&gt;19 7 4.59047619&lt;BR /&gt;20 7 4.427272727&lt;BR /&gt;21 7 4.301666667&lt;BR /&gt;22 7 4.35&lt;BR /&gt;23 7 4.439583333&lt;BR /&gt;24 7 4.444384058&lt;BR /&gt;25 7 4.466458333&lt;BR /&gt;1 8 3.81780303&lt;BR /&gt;2 8 3.761217949&lt;BR /&gt;3 8 3.706597222&lt;BR /&gt;4 8 3.685648148&lt;BR /&gt;5 8 3.64047619&lt;BR /&gt;6 8 .&lt;BR /&gt;7 8 .&lt;BR /&gt;8 8 .&lt;BR /&gt;9 8 .&lt;BR /&gt;10 8 .&lt;BR /&gt;11 8 .&lt;BR /&gt;12 8 .&lt;BR /&gt;13 8 .&lt;BR /&gt;14 8 .&lt;BR /&gt;15 8 .&lt;BR /&gt;16 8 .&lt;BR /&gt;17 8 .&lt;BR /&gt;18 8 .&lt;BR /&gt;19 8 4.5125&lt;BR /&gt;20 8 4.447569444&lt;BR /&gt;21 8 4.302864583&lt;BR /&gt;22 8 4.302083333&lt;BR /&gt;23 8 4.398611111&lt;BR /&gt;24 8 4.423484848&lt;BR /&gt;25 8 4.397685185&lt;BR /&gt;1 9 4.084722222&lt;BR /&gt;2 9 3.819791667&lt;BR /&gt;3 9 3.714583333&lt;BR /&gt;4 9 3.688888889&lt;BR /&gt;5 9 .&lt;BR /&gt;6 9 .&lt;BR /&gt;7 9 .&lt;BR /&gt;8 9 .&lt;BR /&gt;9 9 .&lt;BR /&gt;10 9 .&lt;BR /&gt;11 9 .&lt;BR /&gt;12 9 .&lt;BR /&gt;13 9 .&lt;BR /&gt;14 9 .&lt;BR /&gt;15 9 .&lt;BR /&gt;16 9 4.40952381&lt;BR /&gt;17 9 4.4890625&lt;BR /&gt;18 9 4.4453125&lt;BR /&gt;19 9 4.582954545&lt;BR /&gt;20 9 4.521388889&lt;BR /&gt;21 9 4.419212963&lt;BR /&gt;22 9 4.346710526&lt;BR /&gt;23 9 4.393849206&lt;BR /&gt;24 9 4.378030303&lt;BR /&gt;25 9 4.343859649&lt;BR /&gt;1 10 .&lt;BR /&gt;2 10 .&lt;BR /&gt;3 10 3.831944444&lt;BR /&gt;4 10 .&lt;BR /&gt;5 10 .&lt;BR /&gt;6 10 .&lt;BR /&gt;7 10 .&lt;BR /&gt;8 10 .&lt;BR /&gt;9 10 .&lt;BR /&gt;10 10 .&lt;BR /&gt;11 10 .&lt;BR /&gt;12 10 .&lt;BR /&gt;13 10 .&lt;BR /&gt;14 10 .&lt;BR /&gt;15 10 .&lt;BR /&gt;16 10 4.258333333&lt;BR /&gt;17 10 4.37125&lt;BR /&gt;18 10 4.455113636&lt;BR /&gt;19 10 4.58375&lt;BR /&gt;20 10 4.548135965&lt;BR /&gt;21 10 4.497916667&lt;BR /&gt;22 10 4.45109127&lt;BR /&gt;23 10 4.453804348&lt;BR /&gt;24 10 4.426086957&lt;BR /&gt;25 10 4.388333333&lt;BR /&gt;1 11 .&lt;BR /&gt;2 11 .&lt;BR /&gt;3 11 .&lt;BR /&gt;4 11 .&lt;BR /&gt;5 11 .&lt;BR /&gt;6 11 .&lt;BR /&gt;7 11 .&lt;BR /&gt;8 11 .&lt;BR /&gt;9 11 .&lt;BR /&gt;10 11 .&lt;BR /&gt;11 11 .&lt;BR /&gt;12 11 .&lt;BR /&gt;13 11 .&lt;BR /&gt;14 11 4.201388889&lt;BR /&gt;15 11 4.24047619&lt;BR /&gt;16 11 4.23030303&lt;BR /&gt;17 11 4.300892857&lt;BR /&gt;18 11 4.448828125&lt;BR /&gt;19 11 4.596820175&lt;BR /&gt;20 11 4.60217803&lt;BR /&gt;21 11 4.577807971&lt;BR /&gt;22 11 4.530018939&lt;BR /&gt;23 11 4.517028986&lt;BR /&gt;24 11 4.428030303&lt;BR /&gt;25 11 4.390740741&lt;BR /&gt;1 12 .&lt;BR /&gt;2 12 .&lt;BR /&gt;3 12 .&lt;BR /&gt;4 12 .&lt;BR /&gt;5 12 .&lt;BR /&gt;6 12 .&lt;BR /&gt;7 12 .&lt;BR /&gt;8 12 .&lt;BR /&gt;9 12 .&lt;BR /&gt;10 12 .&lt;BR /&gt;11 12 .&lt;BR /&gt;12 12 .&lt;BR /&gt;13 12 .&lt;BR /&gt;14 12 4.568055556&lt;BR /&gt;15 12 4.554761905&lt;BR /&gt;16 12 4.278030303&lt;BR /&gt;17 12 4.266071429&lt;BR /&gt;18 12 4.42125&lt;BR /&gt;19 12 4.459143519&lt;BR /&gt;20 12 4.467757937&lt;BR /&gt;21 12 4.485890152&lt;BR /&gt;22 12 4.433630952&lt;BR /&gt;23 12 4.435119048&lt;BR /&gt;24 12 4.372368421&lt;BR /&gt;25 12 4.336111111&lt;BR /&gt;1 13 .&lt;BR /&gt;2 13 .&lt;BR /&gt;3 13 .&lt;BR /&gt;4 13 .&lt;BR /&gt;5 13 .&lt;BR /&gt;6 13 .&lt;BR /&gt;7 13 .&lt;BR /&gt;8 13 .&lt;BR /&gt;9 13 .&lt;BR /&gt;10 13 .&lt;BR /&gt;11 13 .&lt;BR /&gt;12 13 .&lt;BR /&gt;13 13 .&lt;BR /&gt;14 13 .&lt;BR /&gt;15 13 4.547222222&lt;BR /&gt;16 13 4.245833333&lt;BR /&gt;17 13 4.19375&lt;BR /&gt;18 13 4.394196429&lt;BR /&gt;19 13 4.373651961&lt;BR /&gt;20 13 4.355104167&lt;BR /&gt;21 13 4.362797619&lt;BR /&gt;22 13 4.264109848&lt;BR /&gt;23 13 4.21984127&lt;BR /&gt;24 13 4.187037037&lt;BR /&gt;25 13 4.15297619&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc template;&lt;BR /&gt;define statgraph surface;&lt;BR /&gt;begingraph;&lt;BR /&gt;entrytitle 'Yield Data';&lt;BR /&gt;rangeattrmap name="yield_map";&lt;BR /&gt;range 0-3.59/ rangecolormodel=(black);&lt;BR /&gt;range 3.6-4.6 / rangecolormodel=(green yellow red);&lt;BR /&gt;endrangeattrmap;&lt;BR /&gt;rangeattrvar attrvar=yieldvar var=yield attrmap="yield_map";&lt;BR /&gt;layout overlay3d / rotate=45 tilt=50;&lt;BR /&gt;surfaceplotparm x=Latitude y=Longitude z=yield / surfacetype=fillgrid&lt;BR /&gt;colorresponse=yieldvar name="surface";&lt;BR /&gt;continuouslegend "surface";&lt;BR /&gt;endlayout;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods graphics / width=640px height=640px;&lt;BR /&gt;proc g3grid data=surface_data out=gridded;&lt;BR /&gt;grid Longitude*Latitude=Yield / spline&lt;BR /&gt;axis1=0 to 25 by 1&lt;BR /&gt;axis2=0 to 13 by 1;&lt;BR /&gt;run;&lt;BR /&gt;proc sort data=gridded; by Longitude Latitude; run;&lt;/P&gt;&lt;P&gt;proc sgrender data=gridded template=surface;&lt;BR /&gt;run;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12975i5D83015DEF808054/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="result.png" title="result.png" /&gt;</description>
      <pubDate>Wed, 14 Sep 2016 00:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/298182#M10561</guid>
      <dc:creator>amrit11</dc:creator>
      <dc:date>2016-09-14T00:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Generating coloured 3D surface plots</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/318119#M11138</link>
      <description>&lt;P&gt;The output looks like a cube, the data is, however cuboid. The length of the 3d plot is reduced to match the width making the graph look square. Is there a way to correct this to a&amp;nbsp;rectangular surface plot.&lt;/P&gt;&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2016 10:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Generating-coloured-3D-surface-plots/m-p/318119#M11138</guid>
      <dc:creator>amrit11</dc:creator>
      <dc:date>2016-12-11T10:37:36Z</dc:date>
    </item>
  </channel>
</rss>

