<?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: overlay gcontour, gplot in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/overlay-gcontour-gplot/m-p/64926#M18481</link>
    <description>Hi:&lt;BR /&gt;
  You might look at the documentation for the CONTOURPLOTPARM statement. For SAS 9.2, that is:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/topics/statgraph/proctemplate/a002650850.htm" target="_blank"&gt;http://support.sas.com/rnd/base/topics/statgraph/proctemplate/a002650850.htm&lt;/A&gt;&lt;BR /&gt;
                           &lt;BR /&gt;
  It looks like the NHINTS and NLEVELS options control the suggested number of contour levels and the actual number of contour levels. For more help with Graph Templates, you might consider contacting Tech Support, as they know or can find out what or how the syntax worked between SAS 9.1.3 and SAS 9.2.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Tue, 09 Dec 2008 16:14:27 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2008-12-09T16:14:27Z</dc:date>
    <item>
      <title>overlay gcontour, gplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/overlay-gcontour-gplot/m-p/64923#M18478</link>
      <description>hi&lt;BR /&gt;
&lt;BR /&gt;
  I produce 2 plots, one is a line contour plot produced with gcontour of a density computed from kde and the second a scatter plot of the original data produced with gplot. Does anyone know how the line contour plot can be overlayed on the scatter plot. ODS appears to be able to overlay&lt;BR /&gt;
a scatter plot on a filled contour plot but this is not what I want. &lt;BR /&gt;
&lt;BR /&gt;
My version of SAS is 9.1.3&lt;BR /&gt;
&lt;BR /&gt;
Cheers</description>
      <pubDate>Mon, 08 Dec 2008 21:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/overlay-gcontour-gplot/m-p/64923#M18478</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-08T21:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: overlay gcontour, gplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/overlay-gcontour-gplot/m-p/64924#M18479</link>
      <description>Hi:&lt;BR /&gt;
  By default, in SAS 9.1.3, if you use ODS Graphics, it looks like you get a FILLed contour plot with a scatter overlaid on top of it. However, you CAN get a LINE contour plot with a scatter overlaid on it, by changing the DISPLAY=FILL in the graph template to DISPLAY=LINE for the CONTOURPLOTPARM statement:&lt;BR /&gt;
[pre]&lt;BR /&gt;
  ContourPlotParm x=DENSITYX y=DENSITYY z=DENSITYCOUNT / &lt;BR /&gt;
            &lt;B&gt; display=line&lt;/B&gt; nhint=15 name="Contour";                               &lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                           &lt;BR /&gt;
  I don't see an overlay option in the PLOT statement of Proc GCONTOUR, so I'm not sure you'd be able to do what you want with PROC GPLOT/PROC GCONTOUR.&lt;BR /&gt;
&lt;BR /&gt;
  Perhaps the program below will give you an idea of what's possible with ODS Graphics in SAS 9.1.3 and will give you something to look forward to in SAS 9.2....I haven't investigated a lot, so I don't know whether the new SGPLOT/SGSCATTER will allow you to accomplish what you want (but I suspect it might).&lt;BR /&gt;
&lt;BR /&gt;
  Until then, perhaps some form of the program below will help. For more information on using Graph Templates with SAS 9.1.3, refer to this paper:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi30/239-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/239-30.pdf&lt;/A&gt;&lt;BR /&gt;
(Also, please note that this paper uses 9.1.3 specific syntax. With the new "statgraph" procedures available in SAS 9.2, changes to the graph template will probably NOT be needed.) &lt;BR /&gt;
&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
*** the program;&lt;BR /&gt;
ods path work.tmp(update)&lt;BR /&gt;
         sashelp.tmplmst(read);&lt;BR /&gt;
                       &lt;BR /&gt;
proc template;      &lt;BR /&gt;
   define statgraph Stat.KDE.Graphics.ContourScatter;&lt;BR /&gt;
      dynamic _SCATTER _TITLE _DEPLABEL _DEPLABEL2;&lt;BR /&gt;
      layout Gridded;&lt;BR /&gt;
         layout overlay / padbottom=5;&lt;BR /&gt;
            entrytitle _TITLE;&lt;BR /&gt;
         endlayout;&lt;BR /&gt;
         layout lattice / rows=1 columns=1;      &lt;BR /&gt;
            layout Overlay / xaxisopts=( thresholdmin=0 thresholdmax=0 )&lt;BR /&gt;
               yaxisopts=( thresholdmin=0 thresholdmax=0 ) xoffsetmin=0&lt;BR /&gt;
               xoffsetmax=0 yoffsetmin=0 yoffsetmax=0 padright=5;&lt;BR /&gt;
               ContourPlotParm x=DENSITYX y=DENSITYY z=DENSITYCOUNT / &lt;BR /&gt;
                   display=line nhint=15 name="Contour";  &lt;BR /&gt;
               if (_SCATTER=1)                   &lt;BR /&gt;
                  scatterplot x=X y=Y / &lt;BR /&gt;
                  markersymbol=GraphDataDefault:markersymbol &lt;BR /&gt;
                  markercolor=GraphDataDefault:contrastcolor &lt;BR /&gt;
                  markersize=GraphDataDefault:markersize;   &lt;BR /&gt;
               endif;&lt;BR /&gt;
            EndLayout;&lt;BR /&gt;
            row2header;&lt;BR /&gt;
               GradientLegend "Contour"; &lt;BR /&gt;
            endrow2header; &lt;BR /&gt;
         EndLayout;&lt;BR /&gt;
      EndLayout;    &lt;BR /&gt;
   end;             &lt;BR /&gt;
run;  &lt;BR /&gt;
                   &lt;BR /&gt;
                    &lt;BR /&gt;
ods html path='.' (url=none)&lt;BR /&gt;
         file='kde_graf.html' style=analysis;&lt;BR /&gt;
ods graphics on;&lt;BR /&gt;
ods select contourscatter;&lt;BR /&gt;
proc kde data=sashelp.class;&lt;BR /&gt;
  bivar age height / plots=all;&lt;BR /&gt;
run;&lt;BR /&gt;
                   &lt;BR /&gt;
ods graphics off;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 09 Dec 2008 05:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/overlay-gcontour-gplot/m-p/64924#M18479</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-09T05:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: overlay gcontour, gplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/overlay-gcontour-gplot/m-p/64925#M18480</link>
      <description>Thanks Cynthia&lt;BR /&gt;
&lt;BR /&gt;
    I think I can get kind of what I want from this code. But is there a way to set the contour levels&lt;BR /&gt;
explicitly as in gcontour where you can use the levels option.&lt;BR /&gt;
&lt;BR /&gt;
Cheers</description>
      <pubDate>Tue, 09 Dec 2008 15:35:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/overlay-gcontour-gplot/m-p/64925#M18480</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-09T15:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: overlay gcontour, gplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/overlay-gcontour-gplot/m-p/64926#M18481</link>
      <description>Hi:&lt;BR /&gt;
  You might look at the documentation for the CONTOURPLOTPARM statement. For SAS 9.2, that is:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/topics/statgraph/proctemplate/a002650850.htm" target="_blank"&gt;http://support.sas.com/rnd/base/topics/statgraph/proctemplate/a002650850.htm&lt;/A&gt;&lt;BR /&gt;
                           &lt;BR /&gt;
  It looks like the NHINTS and NLEVELS options control the suggested number of contour levels and the actual number of contour levels. For more help with Graph Templates, you might consider contacting Tech Support, as they know or can find out what or how the syntax worked between SAS 9.1.3 and SAS 9.2.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 09 Dec 2008 16:14:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/overlay-gcontour-gplot/m-p/64926#M18481</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-09T16:14:27Z</dc:date>
    </item>
  </channel>
</rss>

