- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
[Graph Builder in JSL] how to select graph build as an object in one Lineup Box
Hi, currently I created a lineup box with several graphs like 3 in it, and after the window popped out, I want to select each the graph by xpath then do some actions like sizing or adding ref line..
However I found that I am not able to use a for loop to individually select the graphs in my lineup box, what should I do? thanks!
(I tried to use gb1 = Graph Builder 1; gb2 = Graph Builder 2; gb3 = ... but I don't think it is an effective way.)
NW = New Window("GRA", LB = Lineup Box(N Col( 2 )));
LB << Append(
Graph Builder(
Variables(X,Y...
Graph Builder(
Variables(X,Y...
Graph Builder(
Variables(X,Y...
);
TotalGB = LB << xpath("//LineUpBox/Box"); # This is wrong for selecting graph object #
For( ii = 1, ii <= N Items(TotalGB), ii++,
TotalGB[ii] << Size( 800, 500 );
);
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: [Graph Builder in JSL] how to select graph build as an object in one Lineup Box
If you are adding them this way, you could create the references while appending them (collect them into a list and not separate variables). If you wish to use XPath you can do something like
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("", lub = Lineup Box());
lub << Append(
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
lub << Append(
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
gbs = (lub << XPath("//OutlineBox[@helpKey = 'Graph Builder']")) << get scriptable object;
without XPath for example
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("", lub = Lineup Box());
gbs = {};
lub << Append(
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
Insert Into(gbs, gb);
lub << Append(
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
Insert Into(gbs, gb);
show(gbs);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: [Graph Builder in JSL] how to select graph build as an object in one Lineup Box
If you are adding them this way, you could create the references while appending them (collect them into a list and not separate variables). If you wish to use XPath you can do something like
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("", lub = Lineup Box());
lub << Append(
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
lub << Append(
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
gbs = (lub << XPath("//OutlineBox[@helpKey = 'Graph Builder']")) << get scriptable object;
without XPath for example
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("", lub = Lineup Box());
gbs = {};
lub << Append(
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
Insert Into(gbs, gb);
lub << Append(
gb = dt << Graph Builder(
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
);
Insert Into(gbs, gb);
show(gbs);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: [Graph Builder in JSL] how to select graph build as an object in one Lineup Box
Hello jthi,
It works, really appreciate it!