powered by
Make two side-by-side surface plots, particularly useful towards a comparative study of two spatial surfaces.
surfaceplot2( tab, coords_name, var1_name, var2_name, h = 8, col.pal, mark_points = FALSE )
a list containing two ggplot objects
ggplot
a data-frame containing spatial co-ordinates and the variables to plot
name of the two columns that contains the co-ordinates of the points
name of the column containing the first variable to be plotted
name of the column containing the second variable to be plotted
integer; (optional) controls smoothness of the spatial interpolation as appearing in the MBA::mba.surf() function. Default is 8.
MBA::mba.surf()
Optional; color palette, preferably divergent, use colorRampPalette function from grDevices. Default is 'RdYlBu'.
colorRampPalette
grDevices
Logical; if TRUE, the input points are marked. Default is FALSE.
TRUE
FALSE
Soumyakanti Pan span18@ucla.edu, Sudipto Banerjee sudipto@ucla.edu
data(simGaussian) plots_2 <- surfaceplot2(simGaussian, coords_name = c("s1", "s2"), var1_name = "z_true", var2_name = "y") plots_2
Run the code above in your browser using DataLab