Principal Component Filter ScriptHello,
I noticed that there is no way to filter through principal components when looking at only a score plot in JMP. However, when using the 'summary' function in JMP there is a filter for looking through these principal components (please see highlighted in photo).

I was looking through the script and it seems as if the score plot is simply using the the summary plot script, but removing for all the other components except for the score plot.
Estimation Method( "Default" ),
"on Correlations",
Summary Plots( 0 ),
Score Plot( 2 ),
SendToReport(
Dispatch(
{"Score Plot"},
"101",
ScaleBox,
{Format( "Fixed Dec", 12, 1 ), Min( -7.65511111111111 ),
Max( 6.12868740740741 ), Inc( 2.5 ), Minor Ticks( 0 )}
),
Dispatch(
{"Score Plot"},
"100",
ScaleBox,
{Min( -9.25066666666667 ), Max( 17.0666666666667 ), Inc( 5 ),
Minor Ticks( 0 )}
)
)
)
I am creating a dashboard and only need the score plot with that principal component filter. Is there anyway to add that principal component filter to the script?
Thanks!
Content OrganizationData Exploration and VisualizationRe: Principal Component Filter Scriptjust solved the problem! found the row legend by right click on the figure. Much simply than expected.
Re: Principal Component Filter ScriptHi Mike,
How to color the data points by group in the principal components analysis plots as you did?
I'm new to PCA and just learnt to use this in JMP. I didn't find the group setting in the loading interface of PCA and couldn't achieve that at all. Your post gave me some hope.
Thank you
Diana
Re: Principal Component Filter ScriptIf you are trying to stay within the PCA platform you could use the Summary Plots section and just hide the other items. One potential downside to this method is any customization the user made to their instance of JMP could lead to unwanted effects on your report. For example, the user might have the loading matrix automatically open when they run a PCA.
Here is one method to hide the other elements:
names default to here(1);
dt = Open("$Sample_data/iris.jmp");
pc = dt << Principal Components(
Y( :Sepal length, :Sepal width, :Petal length, :Petal width ),
Estimation Method( "Default" ),
"on Correlations"
);
//Hide the unwanted elements - there is a lot to take in here, see
// pc << Get XML and use web searches for xpath to learn more.
(pc << XPath( "//TableBox" )) << Visibility(Collapse);
(pc << XPath( "//BorderBox[PictureBox]" ))[2] << Visibility(Collapse);
(pc << XPath( "//BorderBox[CheckBoxBox]" )) << Visibility(Collapse);Another option might be to export the scores as columns and then generate the plot using graph builder and either column switchers or a couple combo boxes with a script to delete and recreate the chart.