Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3986630
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:02:15+00:00 2026-05-20T06:02:15+00:00

I have 3 groups of data that had PCA performed on them as one

  • 0

I have 3 groups of data that had PCA performed on them as one group. I want to highlight each variable group with a different color. Prior to this I overlaid 3 biplots. This gives different colors but creates a distortion in the data as each biplot function skews the data. This caused the groups to all be skewed by different amounts, making the plot not a correct representation.

How do I take a PCA scores matrix (30×3) and split it so the first 10×3 is one color, the next 10×3 is another and the third 10×3 is another, without the data being skewed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:02:15+00:00Added an answer on May 20, 2026 at 6:02 am

    This is the method I used to plot biplot data with different colors. The lines of code prior to plot are taken from the biplot.m file. The way biplot manipulates data is kept intact and stops skewing of data when using overlaid biplots.

    This coding is not the most efficient, one can see parts that can be cut. I wanted to keep the code intact so one can see how biplot works in it’s entirety.

    %%%%%%%%%%%%%%%%%%%%%
    
    xxx = coeff(:,1:3); 
    yyy= score(:,1:3);
    
    **%Taken from biplot.m; This is alter the data the same way biplot alters data - having the %data fit on grid axes no larger than 1.**
    
    [n,d2] = size(yyy);  
    [p,d] = size(xxx); %7 by 3  
    [dum,maxind] = max(abs(xxx),[],1);  
    colsign = sign(xxx(maxind + (0:p:(d-1)*p)));  
    xxx = xxx .* repmat(colsign, p, 1);  
    yyy= (yyy ./ max(abs(yyy(:)))) .* repmat(colsign, 42, 1);  
    nans = NaN(n,1);  
    
    ptx = [yyy(:,1) nans]';  
    pty = [yyy(:,2) nans]';  
    ptz = [yyy(:,3) nans]';  
    
    **%I grouped the pt matrices for my benefit** 
    
    plotdataholder(:,1) = ptx(1,:);  
    plotdataholder(:,2) = pty(1,:);  
    plotdataholder(:,3) = ptz(1,:);  
    
    **%my original score matrix is 42x3 - wanted each 14x3 to be a different color**
    
    scatter3(plotdataholder(1:14,1),plotdataholder(1:14,2),plotdataholder(1:14,3),35,[1 0 0],'marker', '.');   
    hold on;  
    scatter3(plotdataholder(15:28,1),plotdataholder(15:28,2),plotdataholder(15:28,3),35,[0 0 1],'marker', '.') ;  
    scatter3(plotdataholder(29:42,1),plotdataholder(29:42,2),plotdataholder(29:42,3),35,[0 1 0],'marker', '.');   
    xlabel('Principal Component 1');  
    ylabel('Principal Component 2');  
    zlabel('Principal Component 3');  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data that has various attributes and I want to hierarchically group
I have a (dense) dataset that consist of 5 groups, so my data.frame looks
I have a query that returns data with group category and some details like
Possible Duplicate: Linq - Top value form each group I have data in the
We have a table that has had the same data inserted into it twice
I had three table i.e,personalinfo,groups_designation,groups_desig_category personalinfo:pid(personal id) groups_designation:gid(group id) groups_desig_category:gid,pid Actually I have data
I have a data that looks similar to this Tables contains more than one
I have a set of data that is structured like this: ItemA.GroupA ItemB.GroupA ItemC.GroupB
I have this code for update: public Boolean update() { try { data.put(ContactsContract.Groups.SHOULD_SYNC, true);
I am trying to group some data without much luck. I have a list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.