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

Is it possible to combine two pictures in one expression column?

Hi,

 

I have a table with two expression columns containing pictures. When I hover the mouse over the data points only one picture is displayed, despite both columns being labelled. 

What is the easiest way to display both pictures at the same time? For instance, is it possible to combine the two pictures in a single expression column so that when this is labelled, both pictures get displayed?

I have tried to group the expression columns but still, only one picture gets displayed.

 

Thanks,

 

Nuria

6 REPLIES 6
txnelson
Super User

Re: Is it possible to combine two pictures in one expression column?

Within JMP you have the ability to play with pictures.  Here is one possible way of creating what you need:twopic.PNG

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );

pic = dt:picture[1];
pic2 = dt:picture[2];
hlb = H List Box( pp = Picture Box( pic ), Picture Box( pic2 ) );

outpic = hlb << get picture;

dt:picture[3] = outpic;

 

Jim
Craige_Hales
Super User

Re: Is it possible to combine two pictures in one expression column?

Nice!

Craige
nvi
nvi
Level I

Re: Is it possible to combine two pictures in one expression column?

Hello,

 

That is very nice. Thank you!

Now, I should have mentioned that I have never ever written a JMP script before.

I can see from your example what the scritp is doing. Taking the pictures from position 1 and 2 and putting them together in position 3, in the same "picture" column.

I have tried to implement that in my table by changing where it says "picture" to "the name of my column column" but it doesn't do anything. What am I missing?

Also, I should mention that I have two columns with 180 pictures each and would like to combine them in a third new column to have a double picture. Is there a way to do that for all of them at the same time?

 

Thanks,

 

Nuria

 

 

 

 

txnelson
Super User

Re: Is it possible to combine two pictures in one expression column?

Can you upload a sample of the script you are using, and also a sample of the data table the images are in? That would be very helpful.
Jim
nascif_jmp
Level VI

Re: Is it possible to combine two pictures in one expression column?

This will make a nice graphlet in a few weeks... :)

nascif_jmp
Level VI

Re: Is it possible to combine two pictures in one expression column?

OK, it has been a "few weeks" and JMP 15.0 is finally out.

This means you can take advantage of new features such as graphlets that were designed to support customizations such as this.

Just RMB on the graph background, launch the Hover Label Editor and add the following script (based on @txnelson solution, thx!) in the Graphlet Picture tab:

dt = local:_dataTable;
pic = dt:picture[local:_firstRow];
pic2Idx = If(local:_firstRow == NRows(), 1, local:_firstRow + 1);
pic2 = dt:picture[pic2Idx];
hlb = H List Box( pp = Picture Box( pic ), Picture Box( pic2 ) );
hlb << get picture;

No need to add new columns. A graph with pinned tooltips would look like the following:

graphlet_two_images.jpg

For more information on graphlets, check https://www.jmp.com/content/dam/jmp/documents/en/support/jmp15/using-jmp.pdf, page 512.