View source: R/utility_plot_landscape.R
| plot.landscape | R Documentation |
Given a persistence landscape object in S3 class landscape, visualize the
landscapes using ggplot2.
## S3 method for class 'landscape'
plot(x, ...)
x |
a |
... |
extra parameters including
|
a ggplot2 object.
# Use 'iris' data
XX = as.matrix(iris[,1:4])
# Compute Persistence diagram and landscape of order 0
homology = diagRips(XX)
landscape = diag2landscape(homology, dimension=0)
# Plot with 'barcode'
opar <- par(no.readonly=TRUE)
plot(landscape)
par(opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.