BookmarkSubscribeRSS Feed
Sascoder
Obsidian | Level 7

Hey All,

I want to code the following contour plot using SGplot because I need to backtransform the variables.

 

cntrtstc.png

 

 

It was generated with this code:

     ods output contourfitPlot=cntrssd;
     proc plm restore=an.mod1272_21;
           effectplot contour(x=depth y=tempst );

 

and the data looks like this:

   

Obs    _PREDICTED     _XCONT2     _XCONT1

    1      0.16656     -3.28626    -1.38299

   2      0.16345     -3.17094    -1.38299

   3      0.16038     -3.05562    -1.38299

 

Does anyone know how to do this?

 

Thanks very much!

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Here are a lot of examples with code:

https://blogs.sas.com/content/?s=contour

 

Keep a link to the site:

https://blogs.sas.com/content/graphicallyspeaking/

 

As it is a great reference for any graph you can think of.

Jay54
Meteorite | Level 14

SGPLOT does not support contours.  But GTL does.  Please see this sample:

http://support.sas.com/documentation/cdl/en/grstatgraph/65377/HTML/default/viewer.htm#p1b46pguxw79eg...

 

Sascoder
Obsidian | Level 7

Thanks All!

 

I wonder if SAS has a repository where it stores the code for its automatic plots?

Maybe there are too many choices for this?

Rick_SAS
SAS Super FREQ

Yes, the repository is the template library. See many of Warren Kuhfeld's books and blog posts for how to use graph templates, For a concise overview, see the SAS/STAT documentation on graph temp[lates.

 

For this contour plot example, I suggest the article "Create a contour plot in SAS."

Sascoder
Obsidian | Level 7

Thanks all!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1785 views
  • 0 likes
  • 4 in conversation