Identifying Titles of Graph Builder Page TitlesIn the following graph, I want to be able to identify the page titles:

i.e. "sex = F" and "sex = M".
Looking at the display tree it would appear that the titles are associated with a display box of type GraphBuilderGroupBox:

I have the following script:
Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
Size( 378, 714 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( :height ), Y( :weight ), Page( :sex ) ),
Elements( Points( X, Y, Legend( 8 ) ), Smoother( X, Y, Legend( 9 ) ) )
);
rep = gb << report;
lst = rep << xpath("//GraphBuilderGroupBox");
for (i=1,i<=nitems(lst),i++,
title = lst[i] << get text;
)
Unfortunately this doesn't work (title = "" for both pages).
Does anyone have any suggestions?
Thanks,
David
GraphicsScriptingRe: Identifying Titles of Graph Builder Page TitlesThis is one element I havent figured out how to directly access with Report layer or Xpath //GraphBuilderGroupBox << Get Window Title issue . Not sure if they could be built somehow using Get Variables
Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
Size( 378, 714 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( :height ), Y( :weight ), Page( :sex ) ),
Elements( Points( X, Y, Legend( 8 ) ), Smoother( X, Y, Legend( 9 ) ) )
);
gbb = Report(gb)[Graph Builder Box(1)];
Show(gbb << get variables);
Show(gbb << get variable(1));Re: Identifying Titles of Graph Builder Page TitlesWow! That is one uncooperative box! Try using rep<
@XanGreggthe box in question transforms itself into something friendlier when journaled. But in isolation, in the live graph builder, it won't say anything about itself.
Re: Identifying Titles of Graph Builder Page TitlesFor page, group, and wrap variables you can set a column property defining the value order and then use that to be sure of which plot is which. I often want to change the column or level names anyway and now this can all be done in a transform column:
Open("$SAMPLE_DATA/Big Class.jmp");
pageOrder = {"Female", "Male"};
Eval( Eval Expr(
gb = Graph Builder(
Size( 378, 714 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( :height ),
Y( :weight ),
Page( Transform Column( "Respondent Sex", Nominal, Set Property("Value Order", {Custom Order( Expr( pageOrder ))}), Formula( if(:sex=="M", "Male", "Female" ) ) ) )
),
Elements( Points( X, Y, Legend( 8 ) ), Smoother( X, Y, Legend( 9 ) ) )
)
) );
Side note: The GraphBuilderGroupBox you referenced probably does not contain that text, note that if you set the visibility to hidden the heading is still there. I think this element just doesn't show up in the tree, sort of like how individual points aren't in there. It would be nice if both were accessible!
Re: Identifying Titles of Graph Builder Page TitlesThanks for that suggestion @ih . The specific reason for wanting to get the titles of the pages is that I don't know ahead of time the list of potential values (i.e. pageOrder in this example). In the real-world example the chart has over 400 pages (don't ask me why anyone wants a chart that size!) and the number of pages changes in reason to a local data filter. If all else fails I will go back to trying to build that list - for my initial attempt my list contained about 460 elements and the graph only had 407 pages - perhaps some combinations were being excluded due to missing data - I've not investigated that yet - still trying to find the path of least resistance!
Re: Identifying Titles of Graph Builder Page TitlesThanks @Craige_Hales - looks like this will be a workable solution.