Superimpose PCA plot

Issue #958 new
Veerendra Kumar created an issue

Dear All

I want to plot residue wise contribution to PCs. I am able to plot the residue vs individual PCs (PC1-3). using:

plot.bio3d(pc.xray$au[,2], resno=ref.pdb, sse=ref.pdb, ylab="PC1")

However, I want all three PCs together (different color) in a single plot. I mean on X axis amino acids and on Y axis PC values for PC1-3. 

How can I do that? 

Thank you

Comments (3)

  1. Xinqiu Yao

    Use the R basic function lines() to add lines to an existing plot. For example,

    plot.bio3d(pc.xray$au[, 1], resno=ref.pdb, sse=ref.pdb, ylab="PCs")
    lines(pc.xray$au[, 2], col="red")
    lines(pc.xray$au[, 3], col="blue") 
    

  2. Log in to comment