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
I've got the same problem and I feel like I've tried everything.
I tried nuking the "Name" Column
bringing the name column back
re-assigning the map role.
If I exit jmp and then open the exact same data table and drag "Name" down into map shapes IT WORKS!
Ok so it looks like its POSSIBLE to have 2 separate map shapes and draw them at the same time.
It looks like its NOT POSSIBLE to edit XY,Name,Main --> refresh an existing setup without exiting and re-opening jmp.
I'd say that's a bug, but I can dance around it for now, Lucky for me there are only a few potential rotations so I'm just going to generate them all ahead of time and serve them up like the worlds most amateurish static web page.
If we need a live example I'll try to make a simple use case that doesn't contain all the IP my current files are lugging.
But I need this scripted appropriately because I'm trying to create a "rotate" function so after adjusting all the XY coords of my map shapes I need to be able to redraw them!
help me obi wan jmp community you're my only hope.
Update tried more things. Literally the only way I can get this to work is by exiting and re-opening jmp
It's even resistant to delete symbols();
So the bug seems to be, JMP cannot "redraw" existing map shapes. To refresh or change map shapes you'd have to restart jmp entirely.
Therefore the workaround is to create the rotation as a new set of tables, delete the old graphbuilder and replace with new one.
Re: jmp 15 graph builder somehow retains stale reference to map shapes
Created:
Jul 31, 2021 07:36 AM
| Last Modified: Jul 31, 2021 10:56 AM(573 views)
| Posted in reply to message from xxvvcczz 07-12-2021
Haven't tested with JMP16, but With JMP15 I did manage to replicate the issue you are having. Didn't figure out how to manage changing the map shape without creating new ones and then updating Column Property with new map file and Shape property in graph builder (so you don't have to re-create graph builder).
Here is an example which will work with rotation, but to use it in production it will need more code to handle the map file creation/rotation in more efficient manner.
Names Default To Here(1);
::GLOBAL_MAP_ID = 1;
Create Directory("$TEMP/MAPTEST/");
mapNames = New Table("MAPTEST"||Char(::GLOBAL_MAP_ID)||"-Name",
Add Rows(4),
New Column("Shape Id", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4]), Set Display Width(48)),
New Column("Name",
Character,
"Nominal",
Set Property("Map Role", Map Role(Shape Name Definition)),
Set Values({"TopLeft", "TopRight", "BottomRight", "BottomLeft"}),
Set Display Width(67)
),
private
);
Close(mapNames, Save("$TEMP/MAPTEST/MAPTEST"||Char(::GLOBAL_MAP_ID)||"-Name.jmp"));
mapXy = New Table("MAPTEST-XY",
Add Rows(16),
Compress File When Saved(1),
New Column("Shape ID",
Numeric,
"Continuous",
Format("Best", 10),
Set Values([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4]),
Set Display Width(50)
),
New Column("Part ID",
Numeric,
"Continuous",
Format("Best", 10),
Set Values([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),
Set Display Width(39)
),
New Column("X1",
Numeric,
"Continuous",
Format("Best", 10),
Set Values([-2, -2, 0, 0, 0, 0, 2, 2, 0, 0, 2, 2, -2, -2, 0, 0]),
Set Display Width(60)
),
New Column("Y1",
Numeric,
"Continuous",
Format("Best", 10),
Set Values([0, 2, 2, 0, 0, 2, 2, 0, -2, 0, 0, -2, -2, 0, 0, -2]),
Set Display Width(52)
),
private
);
Close(mapXy, Save("$TEMP/MAPTEST/MAPTEST"||Char(::GLOBAL_MAP_ID)||"-XY.jmp"));
dt = Eval(EvalExpr(New Table("gb",
Add Rows(4),
New Column("Shape",
Character,
"Nominal",
Set Property("Map Role", Map Role(Shape Name Use(Expr(Get Path Variable("$TEMP")||"/MAPTEST/MAPTEST"||Char(::GLOBAL_MAP_ID)||"-Name.jmp"), "Name"))),
Set Values({"TopLeft", "TopRight", "BottomRight", "BottomLeft"}),
Set Display Width(80)
),
New Column("OrigLoc", Character, "Nominal", Set Values({"TopLeft", "TopRight", "BottomRight", "BottomLeft"}))
)));
nw = New Window("rotation",
H List Box(
V List Box(
Button Box("$TEMP/MAPTEST/", Open("$TEMP/MAPTEST/")),
Button Box("Rotate",
dtXY = Open("$TEMP/MAPTEST/MAPTEST"||Char(::GLOBAL_MAP_ID)||"-XY.jmp");
origX = dtXY:X1 << get as matrix;
dtXY:X1 << set values(origX[5 :: 16]` || origX[1 :: 4]`);
origY = dtXY:Y1 << get as matrix;
dtXY:Y1 << set values(origY[5 :: 16]` || origY[1 :: 4]`);
If(Num(Word(1, JMP Version(), ".")) >= 16,
Close(dtXY, Save("$TEMP/MAPTEST/MAPTEST"||Char(::GLOBAL_MAP_ID)||"-XY.jmp"));
gbr = Report(gb)[Graph Builder Box(1)];
//gbr << Remove Variable(1);
gbr << Remove Variable({:Shape, Role("Shape")});
gbr << Add Variable({:Shape, Role("Shape")});
, //else JMP versions lower than 16
::GLOBAL_MAP_ID++; //move to next
Close(dtXY, Save("$TEMP/MAPTEST/MAPTEST"||Char(::GLOBAL_MAP_ID)||"-XY.jmp"));
Wait(0);
mapNames = New Table("MAPTEST"||Char(::GLOBAL_MAP_ID)||"-Name",
Add Rows(4),
New Column("Shape Id", Numeric, "Continuous", Format("Best", 12), Set Values([1, 2, 3, 4]), Set Display Width(48)),
New Column("Name",
Character,
"Nominal",
Set Property("Map Role", Map Role(Shape Name Definition)),
Set Values({"TopLeft", "TopRight", "BottomRight", "BottomLeft"}),
Set Display Width(67)
),
private
);
Close(mapNames, Save("$TEMP/MAPTEST/MAPTEST"||Char(::GLOBAL_MAP_ID)||"-Name.jmp"));
Current Data Table():Shape << Set Property("Map Role", Eval(EvalExpr(Map Role(Shape Name Use(Expr(Get Path Variable("$TEMP")||"/MAPTEST/MAPTEST"||Char(::GLOBAL_MAP_ID)||"-Name.jmp"), "Name")))));
);
)
),
gb = Graph Builder(Size(640, 534), Show Control Panel(0), Variables(Color(:OrigLoc), Shape(:Shape)), Elements(Map Shapes(Legend(7))));
)
);
dt << On Close(
Try(Window("rotation") << Close Window);
delFiles = Files In Directory("$TEMP/MAPTEST/");
Show(delFiles);
For(i = 1, i <= N Items(delFiles), i++,
Try(Delete File("$TEMP/MAPTEST/"||delFiles[i]), Show(exception_msg));
);
);
Not sure who to tag, but I know @julian has given some instructions how to change variables and elements in graph builders so maybe he has some ideas on this.
Edit: Tested with JMP16 and added If statement to the rotate button for JMP version check. With JMP16 it seems to work just by directly updating the XY file and you can see from the code that the solution is way simpler.
-Jarmo
'
var data = div.getElementsByClassName("video-js");
var script = document.createElement('script');
script.src = "https://players.brightcove.net/" + data_account + "/" + data_palyer + "_default/index.min.js";
for(var i=0;i< data.length;i++){
videodata.push(data[i]);
}
}
}
for(var i=0;i< videodata.length;i++){
document.getElementsByClassName('lia-vid-container')[i].innerHTML = videodata[i].outerHTML;
document.body.appendChild(script);
}
}
catch(e){
}
/* Re compile html */
$compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);
}
if (code_l.toLowerCase() != newBody.getAttribute("slang").toLowerCase()) {
/* Adding Translation flag */
var tr_obj = $filter('filter')($scope.sourceLangList, function (obj_l) {
return obj_l.code.toLowerCase() === newBody.getAttribute("slang").toLowerCase()
});
if (tr_obj.length > 0) {
tr_text = "This post originally written in lilicon-trans-text has been computer translated for you. When you reply, it will also be translated back to lilicon-trans-text.".replace(/lilicon-trans-text/g, tr_obj[0].title);
try {
if ($scope.wootMessages[$rootScope.profLang] != undefined) {
tr_text = $scope.wootMessages[$rootScope.profLang].replace(/lilicon-trans-text/g, tr_obj[0].title);
}
} catch (e) {
}
} else {
//tr_text = "This message was translated for your convenience!";
tr_text = "This message was translated for your convenience!";
}
try {
if (!document.getElementById("tr-msz-" + value)) {
var tr_para = document.createElement("P");
tr_para.setAttribute("id", "tr-msz-" + value);
tr_para.setAttribute("class", "tr-msz");
tr_para.style.textAlign = 'justify';
var tr_fTag = document.createElement("IMG");
tr_fTag.setAttribute("class", "tFlag");
tr_fTag.setAttribute("src", "/html/assets/lingoTrFlag.PNG");
tr_fTag.style.marginRight = "5px";
tr_fTag.style.height = "14px";
tr_para.appendChild(tr_fTag);
var tr_textNode = document.createTextNode(tr_text);
tr_para.appendChild(tr_textNode);
/* Woot message only for multi source */
if(rootElement.querySelector(".lia-quilt-forum-message")){
rootElement.querySelector(".lia-quilt-forum-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) {
rootElement.querySelector(".lia-message-view-blog-topic-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){
rootElement.querySelector(".lia-quilt-blog-reply-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-message")){
rootElement.querySelector(".lia-quilt-tkb-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){
rootElement.querySelector(".lia-quilt-tkb-reply-message").insertBefore(tr_para,rootElement.querySelector(".lia-quilt-row.lia-quilt-row-footer"));
} else if(rootElement.querySelector(".lia-quilt-idea-message")){
rootElement.querySelector(".lia-quilt-idea-message").appendChild(tr_para);
}else if(rootElement.querySelector(".lia-quilt-column-alley-left")){
rootElement.querySelector(".lia-quilt-column-alley-left").appendChild(tr_para);
}
else {
if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) {
rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para);
} else {
rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para);
}
}
}
} catch (e) {
}
}
} else {
/* Do not display button for same language */
// syncList.remove(value);
var index = $scope.syncList.indexOf(value);
if (index > -1) {
$scope.syncList.splice(index, 1);
}
}
}
}
}
}
angular.forEach(mszList_l, function (value) {
if (document.querySelectorAll('div.lia-js-data-messageUid-' + value).length > 0) {
var rootElements = document.querySelectorAll('div.lia-js-data-messageUid-' + value);
}else if(document.querySelectorAll('.lia-occasion-message-view .lia-component-occasion-message-view').length >0){
var rootElements = document.querySelectorAll('.lia-occasion-message-view .lia-component-occasion-message-view')[0].querySelectorAll('.lia-occasion-description')[0];
}else {
var rootElements = document.querySelectorAll('div.message-uid-' + value);
}
angular.forEach(rootElements, function (rootElement) {
if (value == '400410' && "ForumTopicPage" == "TkbArticlePage") {
rootElement = document.querySelector('.lia-thread-topic');
}
/* V1.1 Remove from UI */
if (document.getElementById("tr-msz-" + value)) {
document.getElementById("tr-msz-" + value).remove();
}
if (document.getElementById("tr-sync-" + value)) {
document.getElementById("tr-sync-" + value).remove();
}
/* XPath expression for subject and Body */
var lingoRBExp = "//lingo-body[@id = " + "'lingo-body-" + value + "'" + "]";
lingoRSExp = "//lingo-sub[@id = " + "'lingo-sub-" + value + "'" + "]";
/* Get translated subject of the message */
lingoRSXML = doc.evaluate(lingoRSExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < lingoRSXML.snapshotLength; i++) {
/* Replace Reply/Comment subject with transalted subject */
var newSub = lingoRSXML.snapshotItem(i);
/*** START : extracting subject from source if selected language and source language is same **/
var sub_L = "";
if (newSub.getAttribute("slang").toLowerCase() == code_l.toLowerCase()) {
if (value == '400410') {
sub_L = decodeURIComponent($scope.sourceContent[value].subject);
}
else{
sub_L = decodeURIComponent($scope.sourceContent[value].subject);
}
} else {
sub_L = newSub.innerHTML;
}
/*** End : extracting subject from source if selected language and source language is same **/
/* This code is placed to remove the extra meta tag adding in the UI*/
try{
sub_L = sub_L.replace('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />','');
}
catch(e){
}
// if($scope.viewTrContentOnly || (newSub.getAttribute("slang").toLowerCase() != code_l.toLowerCase())) {
if ($scope.viewTrContentOnly) {
if ("ForumTopicPage" == "IdeaPage") {
if (value == '400410') {
if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){
document.querySelector('.MessageSubject .lia-message-subject').innerHTML = sub_L;
}
}
}
if ("ForumTopicPage" == "TkbArticlePage") {
if (value == '400410') {
if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){
var subTkbElement = document.querySelector('.lia-thread-subject');
if(subTkbElement){
document.querySelector('.lia-thread-subject').innerHTML = sub_L;
}
}
}
}
else if ("ForumTopicPage" == "BlogArticlePage") {
if (value == '400410') {
try {
if((sub_L != "") && (sub_L!= undefined) && (sub_L != "undefined")){
var subElement = rootElement.querySelector('.lia-blog-article-page-article-subject');
if(subElement) {
subElement.innerText = sub_L;
}
}
} catch (e) {
}
/* var subElement = rootElement.querySelectorAll('.lia-blog-article-page-article-subject');
for (var subI = 0; subI < subElement.length; subI++) {
if((sub_L != "") && (sub_L!= undefined) && (sub_L != "undefined")){
subElement[subI].innerHTML = sub_L;
}
} */
}
else {
try {
// rootElement.querySelectorAll('.lia-blog-article-page-article-subject').innerHTML= sub_L;
/** var subElement = rootElement.querySelectorAll('.lia-blog-article-page-article-subject');
for (var j = 0; j < subElement.length; j++) {
if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){
subElement[j].innerHTML = sub_L;
}
} **/
} catch (e) {
}
}
}
else {
if (value == '400410') {
try{
/* Start: This code is written by iTalent as part of iTrack LILICON - 98 */
if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){
if(document.querySelectorAll('.lia-quilt-forum-topic-page').length > 0){
if(rootElement.querySelector('div.lia-message-subject').querySelector('h5')){
rootElement.querySelector('div.lia-message-subject').querySelector('h5').innerText = decodeURIComponent(sub_L);
} else {
rootElement.querySelector('.MessageSubject .lia-message-subject').innerText = sub_L;
}
} else {
rootElement.querySelector('.MessageSubject .lia-message-subject').innerText = sub_L;
}
}
/* End: This code is written by iTalent as part of iTrack LILICON - 98 */
}
catch(e){
console.log("subject not available for second time. error details: " + e);
}
} else {
try {
/* Start: This code is written by iTalent as part of LILICON - 98 reported by Ian */
if ("ForumTopicPage" == "IdeaPage") {
if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){
document.querySelector('.lia-js-data-messageUid-'+ value).querySelector('.MessageSubject .lia-message-subject').innerText = sub_L;
}
}
else{
if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){
rootElement.querySelector('.MessageSubject .lia-message-subject').innerText = sub_L;
/* End: This code is written as part of LILICON - 98 reported by Ian */
}
}
} catch (e) {
console.log("Reply subject not available. error details: " + e);
}
}
}
// Label translation
var labelEle = document.querySelector("#labelsForMessage");
if (!labelEle) {
labelEle = document.querySelector(".LabelsList");
}
if (labelEle) {
var listContains = labelEle.querySelector('.label');
if (listContains) {
/* Commenting this code as bussiness want to point search with source language label */
// var tagHLink = labelEle.querySelectorAll(".label")[0].querySelector(".label-link").href.split("label-name")[0];
var lingoLabelExp = "//lingo-label/text()";
trLabels = [];
trLabelsHtml = "";
/* Get translated labels of the message */
lingoLXML = doc.evaluate(lingoLabelExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
/* try{
for(var j=0;j,';
}
trLabelsHtml = trLabelsHtml+'