map backgroundHello everyone,
I have a folder with several images. I arrive by dragging the images one by one to put the corresponding image in the background of the map (in the graph builder tool). I would like to be able to do this interactively with a JMP tool (JSL script, column selector...).
That is to say modify the base map according to the user's choice and with the images of the mentioned folder.
Here is for example what an image in the background of the map looks like by dragging the image by hand:

Thanks for your help !
Data Exploration and VisualizationRe: fond de carteUsing Add Image to framebox should work
Names Default To Here(1);
folder_of_interest = Convert File Path("$SAMPLE_IMAGES");
filenames = Files In Directory(folder_of_interest);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
swap_img = Expr(
frame = Report(gb)[FrameBox(1)];
Try(
cur_img = frame << FindSeg(PictSeg(1));
cur_img << Remove;
);
img = New Image(folder_of_interest || cur_file);
frame << Add Image(
Image(img),
bounds(top(90), Left(10), bottom(10), Right(90))
);
);
nw = new window("",
H List Box(
rb = Radio Box(filenames, << Set Function(function({this},
cur_file = (this << get selected);
swap_img;
))),
gb = dt << Graph Builder(
Size(528, 456),
Show Control Panel(0),
Variables(X(:weight), Y(:height)),
Elements(Points(X, Y, Legend(3)))
);
)
);Re: base mapthank you for your reply @jthi .
On the one hand I do get all the different images on the left side of the page where I can choose which one to select.
When I select an image, I get the following error message:

Re: fond de carteScript does work for me when using JMP17

Re: base mapThank you, it works correctly, I had forgotten the rest of the path.
However, for the image to be well represented with the correct dimensions I have to use the option "Image"-->"Size/Scale"-->"Fill the graphic".
Is there an option to do this automatically or do I have to do it manually every time?
Thank you for your reply !
Re: fond de carteScripting Index usually is pretty good of finding solutions (you can use same keyword as JMP menu has or parts of it)

Re: base mapI use this script to have the graph builder, I tried to integrate the "fill graph" option but nothing conclusive it does not work correctly.
Names Default To Here(1);
folder_of_interest = Convert File Path("image");
filenames = Files In Directory(folder_of_interest);
dt = current data table();
swap_img = Expr(
frame = Report(gb)[FrameBox(1)];
Try(
cur_img = frame << FindSeg(PictSeg(1));
cur_img << remove;
wait ( 1 );
cur_img << fill graph;
);
img = New Image(folder_of_interest || cur_file);
frame << Add Image(
Image(img),
bounds(frame << fill graph);
);
);
nw = new window("Image référence vs défauts",
H List Box(
rb = Radio Box(filenames, << Set Function(function({this},
cur_file = (this << get selected);
swap_img;
))),
gb = dt << Graph Builder(
Size( 567, 494 ),
Show Control Panel( 0 ),
Variables( X( :COORDXD ), Y( :COORDYD ) ),
Elements( Points( X, Y, Legend( 6 ) ) ),
Local Data Filter(
Add Filter(
columns( :NUMP, :NUMIMAGE ),
Where( :NUMP == "x" ),
Where( :NUMIMAGE == x ),
Display( :NUMP, N Items( 15 ), Find( Set Text( "" ) ) ),
Display( :NUMIMAGE, N Items( 15 ) )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties( 0, {Line Color( 51 )}, Item ID( "COORDYD", 1 ) )
)}
)
)
);
)
);
Re: fond de carteYou need the reference to PictSeg after the image has been set and then use fill graph on that.
Re: basemapGood morning,
In the list of images to select on the left, I get a lot of choices.
Is it possible to change the display format and have a drop-down list where we can search for the images we want to display in the background?
As below:

Thank you for your answers.
Re: fond de carteDepends on your UI. You might be able to use local data filter or you can write your own search box (using Text Edit Box) which can then be used for example with List Box to show the items.
Re: basemapThank you for your reply.
I tried with List Box but I don't know where to integrate it in the script
Names Default To Here(1);
Clear Log();
folder_of_interest = Convert File Path("$SAMPLE_IMAGES");
filenames = Files In Directory(folder_of_interest);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
swap_img = Expr(
frame = Report(gb)[FrameBox(1)];
Try(
cur_img = frame << FindSeg(PictSeg(1));
cur_img << Remove;
);
img = New Image(folder_of_interest || cur_file);
frame << Add Image(
Image(img),
bounds(top(90), Left(10), bottom(10), Right(90))
);
);
nw = new window("",
H List Box(
rb = Radio Box(filenames, << Set Function(function({this},
cur_file = (this << get selected);
swap_img;
))),
gb = dt << Graph Builder(
Size(528, 456),
Show Control Panel(0),
Variables(X(:weight), Y(:height)),
Elements(Points(X, Y, Legend(3)))
);
)
);
Re: fond de carteYou would replace Radio Box with List Box. If you need search feature, you would have to write it yourself as ListBox doesn't have that by default
View more...
Names Default To Here(1);
Clear Log();
folder_of_interest = Convert File Path("$SAMPLE_IMAGES");
filenames = Files In Directory(folder_of_interest);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
swap_img = Expr(
frame = Report(gb)[FrameBox(1)];
Try(
cur_img = frame << FindSeg(PictSeg(1));
cur_img << Remove;
);
img = New Image(folder_of_interest || cur_file);
frame << Add Image(
Image(img)
);
seg = frame << FindSeg(PictSeg(1));
seg << fill graph;
seg << Lock(1);
);
nw = new window("",
H List Box(
rb = List Box(filenames, << Set Max Selected(1), << Set Function(function({this},
cur_file = (this << get selected)[1];
swap_img;
))),
gb = dt << Graph Builder(
Size(528, 456),
Show Control Panel(0),
Variables(X(:weight), Y(:height)),
Elements(Points(X, Y, Legend(3)))
);
)
);
Re: basemapHello everyone,
Using this script, I obtain interactive background images in the chart builder.
I would like to be able to block the images and make the isometric size for each of the images.
I use by default the functions " lock(1) " and " size to isometric " but this only works when I work on a single photo, I cannot generalize the functions for all images, as soon as we modifies the selection of the photo in the background of the graph builder the functions no longer have effects.
How can we solve this problem?
Thank you for your answers.
Re: fond de carteI'm not exactly sure what problem you are having. What type of images are you trying to set? How should they be aligned in your graph? Should they fill the whole graph? Do they have specific bounds?
View more...
Names Default To Here(1);
Clear Log();
folder_of_interest = Convert File Path("$SAMPLE_IMAGES");
filenames = Files In Directory(folder_of_interest);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
swap_img = Expr(
Try(
cur_img = frame << FindSeg(PictSeg(1));
cur_img << Remove;
);
img = New Image(folder_of_interest || cur_file);
frame << Add Image(
Image(img)
);
seg = frame << FindSeg(PictSeg(1));
seg << fill graph;
// seg << bounds(Left(0), Right(100), top(100), bottom(0));
// {l, r, t, b} = seg << getBounds;
seg << Lock(1);
);
nw = new window("",
H List Box(
rb = List Box(filenames, << Set Max Selected(1), << Set Function(function({this},
cur_file = (this << get selected)[1];
swap_img;
))),
gb = dt << Graph Builder(
Size(528, 456),
Show Control Panel(0),
Variables(X(:weight), Y(:height)),
Elements(Points(X, Y, Legend(3)))
);
)
);
frame = Report(gb)[FrameBox(1)];
frame << Size to Isometric(1);