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
MathStatChem
Level VI

Can you display symbols in data table cells and Table Box()

I want to be able to display these symbols

↑ 

based on a mapping rule (e.g. 1 = ↑ , 2 = ↓ 3 = →, 4 = ←)

in either a data table cell or in a table box() display.  

 

Copying and pasting that symbol into a data table cell or as a list item for a String Col Box() isn't working for me to even be able to display the symbol. 

 

 

2 REPLIES 2
jthi
Super User

Re: Can you display symbols in data table cells and Table Box()

For me they do work (Win10, JMP18.0.1)

Names Default To Here(1);

nw = New Window("",
	Table Box(
		String Col Box("Symbols",
			{"↑", "↓" ,"→", "←"}
		)
	)
);

jthi_0-1733948597060.png

jthi_2-1733948690101.png

 

 

-Jarmo
MathStatChem
Level VI

Re: Can you display symbols in data table cells and Table Box()

I got it to work.  Wasn't sure what it was I was doing wrong initially.  

 

Here's the snippet of what I came up with to apply that mapping to an entire data table:

 

dt = Current Data Table();
// conversion map to recode symbols
// dot -> triangle symbol
// d -> downarrow symbol
// dd -> double down arrow symbol
// u -> up arrow symbol
// uu -> double up arrow symbol
aa = ["dot" => "◆",
"d" => "↓",
"u" => "↑",
"uu" => "⇈",
"dd" => "⇊"];

// iterate through all columns
For( k = 1, k <= N Cols( dt ), k++,
	c = Column( dt, k );
	colname = c << get name;
	colvals = c << get values;
	// Try to change values according to the recoding map
	// Try( ) function will not happen  if none of the  value is not one of the characters to convert to a symbol
	For Each( {v, i}, colvals, Try( colvals[i] = aa[v] ) );
	c << set values( colvals );
)