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
JeffG
Level II

Hover graphlet from another data table

Hello,

 

I am trying to create a hover graphlet that links to another data table. The first data table has a bunch of concatenated CSV files which I perform a linear fit on and then graph the individual points by the filename of the CSV files. I would like to see the actual data points from the first data table displayed in a graphlet when I hover over the linear fit values.

 

Here is what I have so far...

Names Default To Here( 1 );
platform = Data Table( "Untitled 364" ) << Bivariate(
	Y( :Y ),
	X( :X ),
	Fit Line( {Line Color( {212, 73, 88} )} ),
	By( :FileName )
);
Wait( 0 );
Report( platform[1] )[Outline Box( "Linear Fit" )][
Outline Box( "Parameter Estimates" )][Table Box( 1 )] << Make Combined Data Table;
Report( platform[1] ) << Close Window;

Graph Builder(
	Size( 531, 405 ),
	Show Control Panel( 0 ),
	Variables( X( :FileName ), Y( :Estimate ) ),
	Elements( Points( X, Y, Legend( 10 ) ) ),
	Local Data Filter( Add Filter( columns( :Term ), Where( :Term == "X" ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Set Graphlet(
				Picture(
					Graph Builder(
						Size( 531, 456 ),
						Show Control Panel( 0 ),
						Variables( X( :X ), Y( :Y ), Overlay( :FileName ) ),
						Elements(
							Points( X, Y, Legend( 5 ) ),
							Line Of Fit( X, Y, Legend( 7 ), Confidence of Fit( 0 ) )
						)
					)
				)
			)}
		)
	)
)

The attached jmp sheet has some example data and the graph I am looking to create in the graphlet. 

 

Thanks for any help!

1 ACCEPTED SOLUTION

Accepted Solutions
nascif_jmp
Level VI

Re: Hover graphlet from another data table

Hi @JeffG,

 

Wow, that was a fun challenge. Please see the attached script, I think it does what you were looking for.

Basically I changed your script to create the graphlet from the original table.

Since the X and Y column names where are same, the where clause created from the derived table works on the original one.

It is like an implicit join.

I used SkipFilter to eliminate the filter on "Term" (which doesn't exist on the original table), to avoid an error message.

Finally, I used Lock Scales( 1 ) to make it easier to compare the different fit lines.

This is the end result:

 

 derived_graphlet_from_source.PNG

Thanks for the great example!

I will have to show this technique in a presentation or two.

View solution in original post

8 REPLIES 8
nascif_jmp
Level VI

Re: Hover graphlet from another data table

Hi @JeffG,

 

Wow, that was a fun challenge. Please see the attached script, I think it does what you were looking for.

Basically I changed your script to create the graphlet from the original table.

Since the X and Y column names where are same, the where clause created from the derived table works on the original one.

It is like an implicit join.

I used SkipFilter to eliminate the filter on "Term" (which doesn't exist on the original table), to avoid an error message.

Finally, I used Lock Scales( 1 ) to make it easier to compare the different fit lines.

This is the end result:

 

 derived_graphlet_from_source.PNG

Thanks for the great example!

I will have to show this technique in a presentation or two.

JeffG
Level II

Re: Hover graphlet from another data table

This is awesome and exactly what I was looking for. Thank you!
JeffG
Level II

Re: Hover graphlet from another data table

Maybe a bonus question - 

 

I tried to implement this within a control chart and the graphlet within the control chart is showing the same graph for every point: all the data in a single graph, not separated by FileName. I think the cause is that Control Chart Builder does not have an input for X. Is there some extra filter that needs to be added to lookup and match the FileName with the control chart values?

nascif_jmp
Level VI

Re: Hover graphlet from another data table

It might very well be that. There is also a bug on the graphlet filter generation in 15 which could also be reason you are having this issue.
I'll locate a workaround, which bypasses the default filter generation and creates it entirely inside the graphlet Picture extension point. Perhaps it would also work for you.

 
JeffG
Level II

Re: Hover graphlet from another data table

Hi @nascif_jmp ,

 

Thanks for the reply. I'll look forward to the workaround.

 

Also if this is a bug, is there a plan to fix it in an upcoming release?

nascif_jmp
Level VI

Re: Hover graphlet from another data table

Hi @JeffG,

The workaround is attached.

Yes, I forgot to say, it was fixed for JMP 16.0.
JeffG
Level II

Re: Hover graphlet from another data table

The work-around is too far above my JSL level, but I can confirm that it is fixed in JMP16!

 

Thank you. What a cool feature!

nascif_jmp
Level VI

Re: Hover graphlet from another data table

@JeffG Glad you enjoy it. And remember, we love screenshots!
Cheers,
Nascif