cancel
Showing results for 
Search instead for 
Did you mean: 

PCA Plot Labeling

Didash
Member

Re: PCA Plot Labeling

Message contains an attachment

I will attach here the sample VI used in my last reply.

Highlighted
carlbohman
Member

Re: PCA Plot Labeling

Message contains an image Message contains an attachment

I only have LabVIEW 18.

I attached what I coded.

 
 
 

block.PNGfront panel.PNG

RavensFan
Knight of NI

Re: PCA Plot Labeling

Compare your VI to the one Didash attached.  See if you can find any differences.  They may be subtle.

 

Spoiler
Look specifically at the Index Array function of the final For Loop and which indices he attached his constants to versus the ones you attached your constants to.  Actually, he did not need to attach any of those constants, it would have worked the same way without them.  With yours, if it was otherwise working for you, you want not have needed to attach the 1 or 2 constants.  Index array defaults to 0 for the first index if unwired, and increments according 1, 2, 3, ... for the indices of the following outputs if unwired.
carlbohman
Member

Re: PCA Plot Labeling

if you read my post I stated that I could not open the .vi since I only had LabVIEW 18.  

Best Regards,

Carl Bohman

RavensFan
Knight of NI

Re: PCA Plot Labeling

Didash put a picture of his VI in his mess as well.

 

If you created your VI by copying his picture, then you did a remarkably good job as your VI looks ALMOST identical to his.  With the exception of the thing I pointed out.

 

Go back and compare his picture in messages 4 and 8 and compare with yours in message 12.

carlbohman
Member

Re: PCA Plot Labeling

Message contains an image

My original code did not transpose so I had the x y z connected.  my bad eyes.

But the plot seems not colored correctly

block 1.PNGfront panel 1.PNG

Didash
Member

Re: PCA Plot Labeling

I pointed out two ways to assign colors to plots in the previous messages. Manually or programmatically.

 

To do it manually you can assign a color to each plot by right clicking on the graph, going to the 3D Plot Propperties, and in the Scatter category you can custom the Color Ramp for each plot. Select the option "None" to assign a single color to the plot and then change it to the color of your preference. 

 

For a programmatically way of assigning colors to plots you can check message 5.

carlbohman
Member

Re: PCA Plot Labeling

Never using 3d plots this has been an educational experience.

All is well.

Thanks to everyone's valuable input to help me put the data in a PCA space format.

Best Regards,

Carl Bohman

RavensFan
Knight of NI

Re: PCA Plot Labeling

Mark one of Didash's messages as the solution.

 

Your thank you message is not the solution to your question.

carlbohman
Member

Re: PCA Plot Labeling

Message contains an image

I have 4 items and make 50 measurements of each it.  I use the AML toolkit to perform PCA and then using the latest discussion I can create my plot.

I think I'm well on my way with my project.

Thanks again for the help.

Best Regards,

Carl Bohman

front panel.PNG