View source: R/utility_plot_homology.R
| plot.homology | R Documentation |
Given a persistent homology of the data represented by a reconstructed
complex in S3 class homology object, visualize it as either a barcode
or a persistence diagram using ggplot2.
## S3 method for class 'homology'
plot(x, ...)
x |
a |
... |
extra parameters including
|
a ggplot2 object.
# Use 'iris' data
XX = as.matrix(iris[,1:4])
# Compute VR Diagram
homology = diagRips(XX)
# Plot with 'barcode'
opar <- par(no.readonly=TRUE)
plot(homology, method="barcode")
par(opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.