cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
matth1
Level IV

Change Where filter in Graph Builder

If I have created a chart with a Where() clause, how do I change that filter from a script?

I can do it with a local data filter, but can't seem to change the Where clause although I can read it using << Get Where Expr

Example:

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder(
	Variables( X( :weight ), Y( :height ), Color( :sex ) ),
	Elements( Points( X, Y, Legend( 3 ) ) ),
	Where( :sex == "F" )
);
gb << get where expr; // outputs :sex == "F"

How do change gb to be restricted to :sex == "M" later in the script?

 

I'm using JMP 18.2.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Change Where filter in Graph Builder

I don't think you can change the Where expression in already created graph builder. If you wish to change those, you could use local data filter which is hidden and update the selections on that.

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Change Where filter in Graph Builder

I don't think you can change the Where expression in already created graph builder. If you wish to change those, you could use local data filter which is hidden and update the selections on that.

-Jarmo
hogi
Level XIII

Re: Change Where filter in Graph Builder

If it's OK to create a new graph, you can work with the script,  replace the Where() expression with a new on and then evaluate the new code:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder(
	Variables( X( :weight ), Y( :height ), Color( :sex ) ),
	Elements( Points( X, Y, Legend( 3 ) ) ),
	Where( :sex == "F" )
);
script = gb << get script;

whereexpr= extract expr(script, Where(wildList()));

Substitute into (script, Name Expr(where expr), Expr(___W___));

// later: new whereexpr = Expr(Where( :sex == "M" )); Substitute into (script, Expr(___W___) , Name Expr(new whereexpr)); Eval(script)

Recommended Articles