MomX / Momocs

:dove: Morphometrics using R
http://momx.github.io/Momocs/
51 stars 19 forks source link

Combine plots using par #183

Closed raz1 closed 6 years ago

raz1 commented 7 years ago

Is it possible to combine plots using par?

if (!requireNamespace("devtools")) install.packages("devtools")
devtools::install_github('vbonhomme/Momocs')

library(Momocs)

data(bot)
test.f <- efourier(bot, nb.h=32)

#PCA
test.p <- PCA(test.f)

#Combine plots
Cpar <- par(mfrow=c(1, 2))
plot(test.p, 1, pos.shp="xy",  title="PCA1")
plot(test.p, 1, pos.shp="xy",  stars=TRUE, title="PCA2-stars")
par(Cpar)
vbonhomme commented 6 years ago

try with eigen=FALSE in both plot calls. otherwise, it creates a subplot for eigen and messes the par. I'll soon integrate a better alternative anyway, based on true layering. sorry for the delay btw.