show_basis | R Documentation |
Generic plotting function for visualising the basis functions.
show_basis(basis, ...)
## S4 method for signature 'Basis'
show_basis(basis, g = ggplot() + theme_bw() + xlab("") + ylab(""))
## S4 method for signature 'TensorP_Basis'
show_basis(basis, g = ggplot())
basis |
object of class |
... |
not in use |
g |
object of class |
The function show_basis
adapts its behaviour to the manifold being used. With real_line
, the 1D basis functions are plotted with colour distinguishing between the different resolutions. With plane
, only local basis functions are supported (at present). Each basis function is shown as a circle with diameter equal to the scale
parameter of the function. Linetype distinguishes the resolution. With sphere
, the centres of the basis functions are shown as circles, with larger sizes corresponding to coarser resolutions. Space-time basis functions of subclass TensorP_Basis
are visualised by showing the spatial basis functions and the temporal basis functions in two separate plots.
auto_basis
for automatically constructing basis functions.
library(ggplot2)
library(sp)
data(meuse)
coordinates(meuse) = ~x+y # change into an sp object
G <- auto_basis(manifold = plane(),data=meuse,nres = 2,regular=2,prune=0.1,type = "bisquare")
## Not run: show_basis(G,ggplot()) + geom_point(data=data.frame(meuse),aes(x,y))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.