- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
adding graphics to each framebox
Hey guys,
i'm new to JSL and would so appreciate your help with a script i'm struggling with for a while.
i wrote a script that produces multiple graphs in one scroll box.
The problem is that i have a different number of frameboxes for each graph and i can't get track of the exact number. it also changes when i change the filter bar param. therefore when i'm trying to add graphics like circle to a framebox that do not exist i receive the message "cannot find framebox..." on the embedded log.
i found a script online that looks like it solves my problem but my script goes into an infinite loop and the error message keeps showing.
the script i was trying:
haveFrameBox =1;
i=0;
while(haveFrameBox,
try(
i++;
report(gb)<<dispatch({}, "Graph builder",FrameBox(i),circle({0,0},150)) ;
,
haveFrameBox=0
)
);
I'm also having troubles with applying "size to isometric" function on each framebox with a for loop, for each i
try(Report(gb)[FrameBox(i)] << size to isometric)
but the output is just a big mess...
Any idea?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: adding graphics to each framebox
You need to take a look at the XPath() function. It may do what you are looking for. Here is a simple use of it to find the number of Frame Boxes in a display
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
biv = bivariate( x( :weight, :age ), y( :height ), by( :sex ) );
Show( N Items( (biv << xpath( "//FrameBox" )) ) );
Take a look in the Scripting Index
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: adding graphics to each framebox
You need to take a look at the XPath() function. It may do what you are looking for. Here is a simple use of it to find the number of Frame Boxes in a display
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
biv = bivariate( x( :weight, :age ), y( :height ), by( :sex ) );
Show( N Items( (biv << xpath( "//FrameBox" )) ) );
Take a look in the Scripting Index
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: adding graphics to each framebox
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: adding graphics to each framebox
an additional thank you