Choose Language Hide Translation Bar

Community Trekker

Joined:

Oct 12, 2017

## How to make contour plots with colored bands, based on DOE prediction formula ?

1 ACCEPTED SOLUTION

Accepted Solutions

Super User

Joined:

Jun 22, 2012

Solution

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

If you have the DOE data table, all you have to do, is to run the model, and under the red triangle in the output, select

Save Columns==>Save Predicted Formula

It will create a new column in your data table that has the predicted values in it.

Then all you have to do is to run the Contour Plot Platform

Graph==>Contour Plot

Jim
9 REPLIES 9

Super User

Joined:

Jun 22, 2012

Solution

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

If you have the DOE data table, all you have to do, is to run the model, and under the red triangle in the output, select

Save Columns==>Save Predicted Formula

It will create a new column in your data table that has the predicted values in it.

Then all you have to do is to run the Contour Plot Platform

Graph==>Contour Plot

Jim

Community Trekker

Joined:

Sep 30, 2016

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

Ha, I guess I should have looked for replies before I hit post. :-)

Community Trekker

Joined:

Sep 30, 2016

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

I am not 100% sure what you are trying to do, but if you save the prediction formula (red triangle -> Save Columns -> Save prediction formula) from a Fit Model that has two continuous inputs, you can then open the Contour Plot, under graph, and see predicted values across the whole design space.

An example script is attached.

Community Trekker

Joined:

Oct 12, 2017

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

txnelson and ih

Thanks a lot for the inputs.

However, when I do this I get a contour plot where the contours are not smooth curves, but lines with "kinks".

That is why I tried using the contour profiler - but in contour profiler I can't make the mulitycolored contour "bands" - i.e where a contour map goes from a red band over yellow, green blue to purple if you do a chromatic contour color.

I am looking for a contour map where I can read the predicted response value off the map. Since the Contour Plot has "lines with kinks" and not "smooth curves", the contours can't be following the prediction formula.

Instead, I plot some predicted values (thank for help with that !) but then the Contour plot just lays a poor approximation of contours over it.

Does this make sense ?

br Ken

Super User

Joined:

Jun 22, 2012

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

Your "Kinky" plot is due to the small number of data points.  All you have to do to smooth out the plot is to generate more data points between the max and min values for your X1 and X2 columns.  The prediction column will automatically generate the Y values, since it is a formula based upon the X1 and X2 column.

Jim

Community Trekker

Joined:

Oct 12, 2017

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

He he, I tried to avoid the term kinky ;-)

Do you have any easy way to generate a lot more X values ?

Or do I have to enter manually ?

Super User

Joined:

Jun 22, 2012

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

Here is a simple script that will create a new data table and will generate whatever range of X1 and X2 values you want.

``````Names Default To Here( 1 );
dt = New Table( "More Points", New Column( "X1" ), New Column( "X2" ) );

// Change the desired min and max for the X1
For( X1Vals = .1, X1Vals <= 2, X1Vals = X1Vals + .1,
// Change the desired min and max for the X2
For( X2Vals = .1, X2Vals <= 2, X2Vals = X2Vals + .1,
dt << Add Rows( 1 );
dt:X1[N Rows( dt )] = X1Vals;
dt:X2[N Rows( dt )] = X2Vals;
)
);

// Now manually add your Y column and paste in the formula
// into the column``````

Or if you just want to add more rows to your current data table, the script below is just a very simple change to the above script

``````Names Default To Here( 1 );
dt = Current Data Table();

// Change the desired min and max for the X1
For( X1Vals = .1, X1Vals <= 2, X1Vals = X1Vals + .1,
// Change the desired min and max for the X2
For( X2Vals = .1, X2Vals <= 2, X2Vals = X2Vals + .1,
dt << Add Rows( 1 );
dt:X1[N Rows( dt )] = X1Vals;
dt:X2[N Rows( dt )] = X2Vals;
)
);``````
Jim

Community Trekker

Joined:

Sep 30, 2016

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

Building on Jim's comment that you need more data points, you can also use the contour plot platform to create this grid for you:

Community Trekker

Joined:

Oct 12, 2017

## Re: How to make contour plots with colored bands, based on DOE prediction formula ?

Thanks ih and Jim !

The contour plot "expansion" illustrated by ih helps me a lot - then I don't need to generate a lot of extra points.

Thanks again for the help !

br Ken