cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
jjswan33
Level III

Controlling marker and smoother visibility in JMP12

I have recently moved from JMP11 to JMP12 and some default behavior has changed for marker and smoother visibility in graph builder.  I am trying to figure out if there is a setting I can change to get the behavior I want.  Specifically in JMP11 when using graph building you could select a point and all the rest of the points in the graph are faded, found a setting for this but the issue is with the smoother.  In JMP11 when I selected a marker all other points were faded but the smoother lines stayed in front but in JMP12 only the smoother line associated with the point selected stays in front and the rest are faded.

 

for example:

JMP12JMP12JMP11JMP11

1 ACCEPTED SOLUTION

Accepted Solutions
XanGregg
Staff

Re: Controlling marker and smoother visibility in JMP12

You can't embed the for loop in the launch script.I think the alternatives are to create the launch script as an expression, using a loop to append items to it, or start with a plain launch script and then send modification messages to it. Here's a script that shows the latter way to do it, which is what SendToReport is doing anyway in the original script.

 

The commented-out line uses xpath to get the scale box by ID, but that only works in later JMPs. In JMP 12, you'll have to indentify the scale box by index, which is 5. You can find that out by using Show Tree Structure.

 

 

Open("$SAMPLE_DATA/Big Class.jmp");
x_axis={:height};
y_axis={:weight};
overlay_col={:age};
nitems = 6;

gb = Graph Builder(
	Variables( X( x_axis[1] ), Y( y_axis[1] ), Overlay( overlay_col[1] )),
	Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 9 ) ) )
);

//sb = (report(gb) << xpath("//ScaleBox[@ID='400']"))[1];
sb = report(gb)[ScaleBox(5)]; // JMP 12
For(i=0, i < NItems, i+=1, sb << Legend Model(3, Properties(i, {Transparency(0.2)}));
);

View solution in original post

6 REPLIES 6
gzmorgan0
Super User (Alumni)

Re: Controlling marker and smoother visibility in JMP12

The behavior you see in JMP 12 was a much requested feature.  The GraphBuilder(GB) you embedded has a Y and an X and an Overlay variable. 

 

If you want the JMP 11 behavior you can get it by using  Fit Y by X (Bivariate):

  • Select Analyze > Fit Y by X, specify Y and X
  • Right click in the graph (FrameBox) and select Row Legend and specify your group variable (color is automatic in GB overlay).
  • Now from the Bivariate menu ( the inverted red triangle by the Header Bivariate) select Group By and select your grouping variable (this is equivalent to GB Overlay)
  • From the Menu, select Fit Flexible >Spline>try 3. (This is equivalent to GB Add > Smoother.)

Now when you select a point the other points are faded but the lines persist. Maybe JMP experts have a solution for GraphBuilder.

XanGregg
Staff

Re: Controlling marker and smoother visibility in JMP12

If you're just going for the effect of faded markers behind the lines, the best way it to change the transparency of the markers. In JMP 12, the legend item for the markers is hidden by default, but if you right-click on the legend area and choose Legend Settings, it will bring up a dialog where you can turn on the marker legend items. Then you can give them a tranparency value that separate from the lines.

jjswan33
Level III

Re: Controlling marker and smoother visibility in JMP12

This doesn't appear to work.  If I turn on the marker legend items and the change the transparency of that it is also changing the transparency of the line associated with that item.  It doesn't let me only select the marker and change the transparency of the marker.  What am I missing?  Also I am not sure this is really a solution because it would mean that I would have to change those settings everytime I make one of these plots, this is not sustainable as it would greatly impact my productitivity.

 

I am not sure who was requesting this change but I have talked with multiple people around here at the company where I work who are not happy with this change.  I can potentially see the value in some instances but to just change the default behavior with no setting to change it is very unfortunate.  I need JMP12 for functionality of some of the scripts from my colleagues but at the same time this is greatly slowing down the speed which I can make these plots.

jjswan33
Level III

Re: Controlling marker and smoother visibility in JMP12

Ok I was able to figure out what you were meaning in the graph builder.  Regardless now I need to automate this to make this a sustainable solution.  The seemingly obvious solution of a for loop doesn't seem to work, I also tried parsing it in.  Any suggestions?

 

 

gb = Graph Builder(
Fit to Window( "Off" ),
Automatic Recalc(1),
Grid Color( "Black" ),
 
Variables(
X(x_axis[1]),
Y(y_axis[1]),
Group X(grouping_x_col[1]),
Overlay(overlay_col[1])
),
Elements(Points(X, Y, Legend(3)), Smoother( X, Y, Legend( 9 ) )),
 
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(3,
For(i=0, i <= NItems, i+=1,
Properties( i, {Transparency( 0.2 )} ),
)}
));

 

 

XanGregg
Staff

Re: Controlling marker and smoother visibility in JMP12

You can't embed the for loop in the launch script.I think the alternatives are to create the launch script as an expression, using a loop to append items to it, or start with a plain launch script and then send modification messages to it. Here's a script that shows the latter way to do it, which is what SendToReport is doing anyway in the original script.

 

The commented-out line uses xpath to get the scale box by ID, but that only works in later JMPs. In JMP 12, you'll have to indentify the scale box by index, which is 5. You can find that out by using Show Tree Structure.

 

 

Open("$SAMPLE_DATA/Big Class.jmp");
x_axis={:height};
y_axis={:weight};
overlay_col={:age};
nitems = 6;

gb = Graph Builder(
	Variables( X( x_axis[1] ), Y( y_axis[1] ), Overlay( overlay_col[1] )),
	Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 9 ) ) )
);

//sb = (report(gb) << xpath("//ScaleBox[@ID='400']"))[1];
sb = report(gb)[ScaleBox(5)]; // JMP 12
For(i=0, i < NItems, i+=1, sb << Legend Model(3, Properties(i, {Transparency(0.2)}));
);
jjswan33
Level III

Re: Controlling marker and smoother visibility in JMP12

Coming back to this a year later.  This is more or less working as I would like but I am having an issue when I remake the plots sometimes.

 

What I believe is happening is in the original graph the smoother and points have the same color so JMP by default is hiding the points but after I change the transparency JMP is automatically displaying both the points and the smoother.  This is redundant.

 

So the question.  I know in the Graph Builder you can right click the legend and click the boxes for the items you want but is there a way to force hide legend items for the graph building in jsl?