Hi,

Is there a way to do 3d plots in EIGENSOFT, using the ploteig.perl program? I have the 2d plot of the first two principal components from EIGENSTRAT, but I need to plot the first 3 principal components in a 3d plot. I was wondering if there are other programs/software which can do this?

Any help would be much appreciated.
You can use R with the scatterplot3d library to make a 3Dplot. Input file is the Eigensoft .evec file, which contains the first 10 principle components (I named this file vcf2eigen.pca.evec).

You can see a picture of the plot here: http://rpubs.com/rbagnall/89838

Here's the code:

```r
library(scatterplot3d)

# read in the vcf2eigen.pca.evec file
df <- read.table("vcf2eigen.pca.evec")

# give column names
names(df) <- c("SampleID", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "POPULATION")

# plot
with(df, scatterplot3d(PC1, PC2, PC3, color = as.numeric(POPULATION), pch=19, main="PCA 1000 Genomes Exome Data (3D)")) 

# add legend
legend("topleft", pch=19, col=c("black", "green", "red", "blue"), legend=c("AFR", "EUR", "SAS", "EAS"))
```