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
Yoga
Level I

Getting Line scan data from contour plots in jmp

Hi, 

 

I have contour plot and I'd like to look at how the data varies along a line in the contour plot. 

 

For eg, the contour plot is a film thickness contour plot. And I'd like to see how the thickness varies along a line I draw anywhere on the contour plot. 

Is this possible?

 

Yoga

2 ACCEPTED SOLUTIONS

Accepted Solutions
gzmorgan0
Super User (Alumni)

Re: Getting Line scan data from contour plots in jmp

There are multiple methods to get a cross sectional view of a contour.  However, it might not be a built-in or single statement that might be available in other programs. 

I have attached a script called ContourCrossSection.jsl. It uses the JMP Sample Data Little Pond.jmp The data represents depths of a pond. It creates a contour, a single cross section view (using Fit Y by X, Bivariate) and a comparative view of 3 cross sections (using Graph Builder).

 

If you are not familiar with JSL, just run the program. I have tested it in JMP12, 13, and 14. The key is the option that you can get from the contour plot options.  On the JMP countour plot select the red traingle menu, select Save, then select Generate Grid.   Specify the number of X and Y slices and an xygrid is generated.

 

Here are a few other ideas:

  • If the number of sample points is not dense, consider creating a smoother curve with a Neural Net or other platform. Sometimes the triangulation is off. With a function there are multple methods to get a cross section.
  • Learn to use the Contour Profiler with a mesh. Then add a local data filter fom the menu an set the range of the Y or X to somthing like 50 <=Y <= 50.1 This is all interactive. There are other options in the profiler.
  • If you can get this easily from another program, for which you have access, you can access R, MatLab, SAS, and in JMP14, Python using JSL and Run Program.   

Hope this helps.

View solution in original post

gzmorgan0
Super User (Alumni)

Re: Getting Line scan data from contour plots in jmp

I have experience with semiconductor data, so I understand wanting to do an analysis for each wafer or each structure.  From your statement "It works for one object. If there are multiple objects, I'm not sure how to group it. " I am assuming your file has a column called wafer and/or structure.  

 

First of all, a data table does not need to be named dt. I do repurpose variable references, but calling all these tables dt could lead to confusion in a larger script.  Name collisions after syntax and typos are the most frequent causes for scripts not working.  

 

For your script, if you are okay with all the graphs placed sequentially in a journal here's my suggested modification to your script to handle a "by group". There is more below this script.

subp = dt << Bivariate ( Y(:Name( "Rdson" )), X(:X), By(:Wafer) );
xx = subp << Find (Outline Box ("Bivariate ?") ); 

//this returns all outline boxes with Bivariate in the title, should be one for each wafer

//This adds the title but maintains the By Wafer = xxxxxxx
For(i=1, i <=nitems(xx), i++,
  ttl = xx[i] << get title;
  p = Contains( ttl, "By");  //find the position of the word By
  xx[i] << Set Title(" Rdson Contour at Y==0 " || substr(ttl, p, 100) ); //something large
);

However, there are other methods to allow you to layout a report so you can see each wafer with each of the scans side-by-side.  Below is an example using Big Class. I have attached a script (see files). Not having a test table, I cannot gurantee it will work, but you might want to try it. 

 

Names default to here(1);
open("$sample_data/Big Class.jmp");

nw = new window("example", lineupbox(ncol(2), Distribution(
	Continuous Distribution( Column( :weight, Horizontal Layout(1) ) ),
	Histograms Only,
	By( :age, :sex )
)));

nw << journal window();

 

View solution in original post

12 REPLIES 12
cwillden
Super User (Alumni)

Re: Getting Line scan data from contour plots in jmp

Hi @Yoga,

Are you saying you want to plot data points on top of your contour plot?  If so, see this thread: https://community.jmp.com/t5/Discussions/Adding-specific-data-points-with-labels-to-a-contour-plot/m...

-- Cameron Willden
Yoga
Level I

Re: Getting Line scan data from contour plots in jmp

Hi Cameron, 

 

Not exactly. I'm looking for the parameter variation when I draw a line from one end to the other of my contour plot. I'll try illustrate it in the best way possible here. 

 

I have a contour plot of film thickness varying on a substrate. Then, I could choose any given X (or Y) and draw a line from one end to the other. Suppose, I want all points at Y=0 but X varying from -50 to +50. I draw a horizontal line from -50 to +50. Then, I would like to see how the thickness varies across that line and a plot show up on the side. 

 

I could do this in a winding way. Take the data set. Then, take another subset of all data points with Y=0. Then plot the thickness vs X (for all Y=0). 

 

I'd like that this can be done at the background when I just draw a line whereever. 

cwillden
Super User (Alumni)

Re: Getting Line scan data from contour plots in jmp

Are you describing a cross-section of the film like a cross web profile at a particular slice along the down web direction? If so, I don’t think there’s any way to get that from the contour profiler.

Do you need to draw a line that interpolates between data point in that cross section like a smoothing spline?
-- Cameron Willden
Yoga
Level I

Re: Getting Line scan data from contour plots in jmp

Hi Cameron, 

 

No, not a smoothing spline. It looks like there is no way to get it now unless I follow the winding way of getting subsets of data.

 

It shouldn't be too hard though to add that functionality in jmp. It is usually present in lot of softwares which map parameters in the X-Y to give a contour plot. And we can play to see how it varies along any line we draw through the contour. 

 

 

gzmorgan0
Super User (Alumni)

Re: Getting Line scan data from contour plots in jmp

There are multiple methods to get a cross sectional view of a contour.  However, it might not be a built-in or single statement that might be available in other programs. 

I have attached a script called ContourCrossSection.jsl. It uses the JMP Sample Data Little Pond.jmp The data represents depths of a pond. It creates a contour, a single cross section view (using Fit Y by X, Bivariate) and a comparative view of 3 cross sections (using Graph Builder).

 

If you are not familiar with JSL, just run the program. I have tested it in JMP12, 13, and 14. The key is the option that you can get from the contour plot options.  On the JMP countour plot select the red traingle menu, select Save, then select Generate Grid.   Specify the number of X and Y slices and an xygrid is generated.

 

Here are a few other ideas:

  • If the number of sample points is not dense, consider creating a smoother curve with a Neural Net or other platform. Sometimes the triangulation is off. With a function there are multple methods to get a cross section.
  • Learn to use the Contour Profiler with a mesh. Then add a local data filter fom the menu an set the range of the Y or X to somthing like 50 <=Y <= 50.1 This is all interactive. There are other options in the profiler.
  • If you can get this easily from another program, for which you have access, you can access R, MatLab, SAS, and in JMP14, Python using JSL and Run Program.   

Hope this helps.

Yoga
Level I

Re: Getting Line scan data from contour plots in jmp

Hi Morgan, 

Thanks for the detailed reply. I'll try and keep you (all) posted. 

Yoga
Level I

Re: Getting Line scan data from contour plots in jmp

Hi Morgan, 

 

This is exactly what I want. I normally do this sub-routine without a script. This script helps.

 

Now, I'm trying to figure out how to integrate this script into my current requirement. 

 

Will keep you posted. 

Yoga
Level I

Re: Getting Line scan data from contour plots in jmp

Hi Morgan (and all), 

 

I managed to get it working for my data table. I also realized, I don't need to go via contour plot all the time. I could make a subtable where all X==0, and get the data along Y and vice-versa, and any other coordinates I like is also possible. The script you provided helped quite a bit. 

 

Now, I'm trying to figure out how to do it across multiple objects. My sample script is below. It works for one object. If there are multiple objects, I'm not sure how to group it. Any inputs on this? I would appreciate it a lot. 

 

In my script, right now I get all the data for one object. I however, have to repeat the same on another object. All objects fall into one category, say "Wafers" or "Structure"...

 

Names Default to Here(1);

dt = open("C:/Users/yoga_***/***.jmp");

dt << Select Where (:Y == 0);

dt << Subset(Output Table("Subset"),Selected Rows(1), Selected Columns (0));

dt = Data Table("Subset");
subp = dt << Bivariate ( Y(:Name( "Rdson" )), X(:X) );
report(subp)[OutlineBox(1)] << Set Title( "Rdson Contour at Y==0" );

subp << Journal Window();
subp << Close Window();

dt = open("C:/Users/yoga_***/***.jmp");

dt << Select Where (:X == 0);

dt << Subset(Output Table("Subset2"),Selected Rows(1), Selected Columns (0));

dt = Data Table("Subset2");
subp = dt << Bivariate ( Y(:Name( "Rdson" )), X(:Y) );
report(subp)[OutlineBox(1)] << Set Title( "Rdson Contour at X==0" );

subp << Journal Window();
subp << Close Window();

dt = open("C:/Users/yoga_***/***.jmp");

dt << Select Where (0.95 < :X/:Y < 1.05);

dt << Subset(Output Table("Subset3"),Selected Rows(1), Selected Columns (0));

dt = Data Table("Subset3");
subp = dt << Bivariate ( Y(:Name( "Rdson" )), X(:X) );
report(subp)[OutlineBox(1)] << Set Title( "Rdson Contour at X==Y" );

subp << Journal Window();
subp << Close Window();

close(Data Table("Subset"), NoSave);
close(Data Table("Subset2"), NoSave);
close(Data Table("Subset3"), NoSave);

 

gzmorgan0
Super User (Alumni)

Re: Getting Line scan data from contour plots in jmp

I have experience with semiconductor data, so I understand wanting to do an analysis for each wafer or each structure.  From your statement "It works for one object. If there are multiple objects, I'm not sure how to group it. " I am assuming your file has a column called wafer and/or structure.  

 

First of all, a data table does not need to be named dt. I do repurpose variable references, but calling all these tables dt could lead to confusion in a larger script.  Name collisions after syntax and typos are the most frequent causes for scripts not working.  

 

For your script, if you are okay with all the graphs placed sequentially in a journal here's my suggested modification to your script to handle a "by group". There is more below this script.

subp = dt << Bivariate ( Y(:Name( "Rdson" )), X(:X), By(:Wafer) );
xx = subp << Find (Outline Box ("Bivariate ?") ); 

//this returns all outline boxes with Bivariate in the title, should be one for each wafer

//This adds the title but maintains the By Wafer = xxxxxxx
For(i=1, i <=nitems(xx), i++,
  ttl = xx[i] << get title;
  p = Contains( ttl, "By");  //find the position of the word By
  xx[i] << Set Title(" Rdson Contour at Y==0 " || substr(ttl, p, 100) ); //something large
);

However, there are other methods to allow you to layout a report so you can see each wafer with each of the scans side-by-side.  Below is an example using Big Class. I have attached a script (see files). Not having a test table, I cannot gurantee it will work, but you might want to try it. 

 

Names default to here(1);
open("$sample_data/Big Class.jmp");

nw = new window("example", lineupbox(ncol(2), Distribution(
	Continuous Distribution( Column( :weight, Horizontal Layout(1) ) ),
	Histograms Only,
	By( :age, :sex )
)));

nw << journal window();