XX1 = circleUnif(30)
XX2 = circleUnif(30, r=2) +3
XX=rbind(XX1,XX2)
DiagLim=5
maxdimension=1
## rips diagram
Diag=ripsDiag(XX,maxdimension,DiagLim, printStatus=TRUE)
#plot
par(mfrow=c(1,3))
plot(Diag)
plot(Diag, rotated=TRUE)
plot(Diag, barcode=TRUE)
Run the code above in your browser using DataLab