BookmarkSubscribeRSS Feed
hjong
Calcite | Level 5

 

I want to change the color of the response surface plots generated using proc rsreg. I also want to include a contour plot below the response surface plot in the same figure. What do I need to include in my code? Here's my code.

proc rsreg data=DOE plots=surface(3d at (Temp=30) unpack);
model T1 = Temp Time Speed;
run;

Thank you.

1 REPLY 1
WarrenKuhfeld
Rhodochrosite | Level 12

You can edit the color model in the template.  The example code shows how you can use a DATA step to perform the edit.

data smell;
   input Odor T R H @@;
   label
      T = "Temperature"
      R = "Gas-Liquid Ratio"
      H = "Packing Height";
   datalines;
 66 40 .3 4     39 120 .3 4     43 40 .7 4     49 120 .7  4
 58 40 .5 2     17 120 .5 2     -5 40 .5 6    -40 120 .5  6
 65 80 .3 2      7  80 .7 2     43 80 .3 6    -22  80 .7  6
-31 80 .5 4    -35  80 .5 4    -26 80 .5 4
;

ods trace on;
ods html body='b.html';
ods graphics on;
proc rsreg data=smell plots=surface;
   model Odor = T R H / lackfit;
run;

proc template;
   delete Stat.Rsreg.Graphics.ContourPanel;
   source Stat.Rsreg.Graphics.ContourPanel / file='t';
quit;

data t(keep=l);
   infile 't' end=eof;
   input;
   if _n_ eq 1 then call execute('proc template;');
   _infile_ = tranwrd(_infile_, 'colormodel=TWOCOLORRAMP',
                      'colormodel=(red orange purple blue)');
   call execute(_infile_);
   if eof then call execute('quit;');                      
   run;

proc rsreg data=smell plots=surface;
   model Odor = T R H / lackfit;
run;
ods html close;

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 806 views
  • 0 likes
  • 2 in conversation