cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
jnikkel
Level II

Is it possible to make a contour plot in JMP with independent X and Y variables?

I am trying to create a contour plot in JMP where my X and Y variables are independent while my Z is dependent on both. So far as I can tell, the contour plotting funciton in JMP seems to be exclusively to look at data density between dependent variables. Is it possible to make a contour plot in JMP that has independent X and Y variables?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Is it possible to make a contour plot in JMP with independent X and Y variables?

So basing my values from your example data table, 2Theta ranges from 20 to 30. Temperature ranges from 0 to 200. Since you have scans across the entire 2theta range for various temperatures, you would get a file for Temperature=0 that would have 2theta ranging from 20 to 30 with values of intensity for each value of 2theta. You would have a similar file for, say, temperature=20. And another for temperature=40, and so on.

 

If I have that right, you could concatenate all of the files together to get a table that looks similar to what I have attached. Now my attached file is based on the three columns you had labeled as IntTemp0, IntTemp20, and IntTemp40. So I only have intensities for temperatures of 0, 20, and 40, not all the way to 200 like you had in the temperature column.

 

If I am correct on the data setup, running the script for the Contour Plot should give you something like what you are looking for. I actually included two scripts, one creating the contour plot using Graph Builder, the other using the Contour Plot platform. There are different options associated with each, so explore and see which one works best for you.

Dan Obermiller

View solution in original post

8 REPLIES 8

Re: Is it possible to make a contour plot in JMP with independent X and Y variables?

Do you have a formula for Z?

 

If not, use Graph > Contour Plot. The X and Y variables go into the X role. Z goes into the Y role. Triangulation will be used to form the contours so they may not be real smooth. To get the smoothest contours, you want a model/formula.

 

If you have a formula, you can still use Graph > Contour Plot, but you could also use Graph > Contour Profiler and only specify the Z column since it has a formula. That will provide a smooter 

Dan Obermiller
jnikkel
Level II

Re: Is it possible to make a contour plot in JMP with independent X and Y variables?

I generally would graph it from matrix form where [x1 .. xn] * [y1 ... yn] = [z11 ... znn]

The x range would then go on the x-axis, y range on the y and the z matrix would define the contour levels in the contour plot.

 

I originally tried your approach, however it just plots my y variable as a line graph with respect to x. For example if x is some continuous distance and y is temperature, I record intensities (Z) as a function of x, and those intensities will change to different values of x with increasing temperatures.

 

If I make a column for my x values and another column for my temperatures, and then have the resulting intensities at each temperature in their own column and follow your approach, it gives me multiple graphs for each resulting intensities that are essentially a line graph of temp vs distance

Re: Is it possible to make a contour plot in JMP with independent X and Y variables?

I'm having a hard time understanding why it did not work for you. Could you share a fictional dataset in the form that you described in your last paragraph? Specifically, a column for X values, a column for the Y values, and a column for the corresponding intensities? And perhaps a picture of what you DO see when you try to make the contour plot along with an example of what it SHOULD look like?

Dan Obermiller
jnikkel
Level II

Re: Is it possible to make a contour plot in JMP with independent X and Y variables?

Not my data, but an example of what the graph is supposed to look like, and a fictional data set is attached.

image11.jpg

Re: Is it possible to make a contour plot in JMP with independent X and Y variables?

Thank you for providing this. I still have more questions. Are the three "Int Temp" columns your intensities?

 

The problem I am having is understanding the data structure yet. JMP, like all statistical programs, is set up as columns being variables, observations being the rows. I think you have three variables: location (which is 2theta), Temperature, and Intensity. If I am correct, for each 2theta, temperature combination you have 3 intensity results. What is the difference between those 3? That could be another variable and another column.

 

Further, in your example dataset, as the 2theta increases, the temperature is increasing. That is causing the line. You never have a situation with a low 2theta (like 20) with the range of temperatures (from 0 to 200). How could you possibly have an intensity for the combination of (20,200) when there is no data there? What contour should be drawn for a combination with no data?

Dan Obermiller
jnikkel
Level II

Re: Is it possible to make a contour plot in JMP with independent X and Y variables?

I believe the issue is a consequence of the way data is organized during experimentation and then determining how to best bring it into JMP.

 

In experimentation, you have multiple scans of the entire 2theta range at varying temperature. This would give a single data file of 2theta vs. intensity (what we have been discussing as 'x' and 'z' with an annotated temperature ('y') value. Doing multiple scans at multiple temperatures gives multiple data files of 2theta vs. intensity with annotated temperatures.

 

When I had access to matlab, as all the 2theta values are constant throughout all data files, I could write a script to strip the data from all data files with a matrix for 2theta [x1, ... , xn], a matrix for the annotated temperatures [y1, ... , yn], and a resultant matrix of the intensity values that correspond to each xi, yi.

 

That ficitonal data set was a representation of an attempt to pull in the original data for each scan (thus one 2theta column with multiple intensity columns) without the knowledge of how to incorporate the temperature data in the JMP data sheet format.

 

Another avenue would be to just use scan number as stand in for temperature as the scans are done continuously with regards to the changing temperature.

Re: Is it possible to make a contour plot in JMP with independent X and Y variables?

So basing my values from your example data table, 2Theta ranges from 20 to 30. Temperature ranges from 0 to 200. Since you have scans across the entire 2theta range for various temperatures, you would get a file for Temperature=0 that would have 2theta ranging from 20 to 30 with values of intensity for each value of 2theta. You would have a similar file for, say, temperature=20. And another for temperature=40, and so on.

 

If I have that right, you could concatenate all of the files together to get a table that looks similar to what I have attached. Now my attached file is based on the three columns you had labeled as IntTemp0, IntTemp20, and IntTemp40. So I only have intensities for temperatures of 0, 20, and 40, not all the way to 200 like you had in the temperature column.

 

If I am correct on the data setup, running the script for the Contour Plot should give you something like what you are looking for. I actually included two scripts, one creating the contour plot using Graph Builder, the other using the Contour Plot platform. There are different options associated with each, so explore and see which one works best for you.

Dan Obermiller
jnikkel
Level II

Re: Is it possible to make a contour plot in JMP with independent X and Y variables?

Thank you, that makes sense. I'll have to play around with scripting to rip the data into that format, most scans have the 2theta range from 10 - 80 with a 0.01 step interval, but that does seem to be the best approach to developing the graph I need in JMP!