cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
MathStatChem
Level VII

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 VII

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 );
)

Recommended Articles