View source: R/DisplayHEALPix.R
displayPixels | R Documentation |
Display the pixels spix at resolution j by colouring in the grandchildren of spix at resolution plot.j
displayPixels( boundary.j, j, plot.j = 5, spix, boundary.col = "gray", boundary.lwd = 1, incl.labels = 1:(12 * 4^boundary.j), col = "blue", size = 3 )
boundary.j |
The resolution to display boundaries at. If this is missing then boundaries will not be plotted. |
j |
The resolution that spix are specified at. |
plot.j |
The resolution to plot grandchildren at |
spix |
Integer vector. The pixel indices to display. These must be in nested order. |
boundary.col |
The boundary colour. |
boundary.lwd |
The boundary line width. |
incl.labels |
Integer vector of pixel indices to label at resolution j. |
col |
The colour to make the grandchildren. |
size |
The size to make the grandchildren. |
## Example 1 ## Plot base pixels 1,2,3 by colouring their grandchildren at resolution ## 5 (by default). No pixel boundaries. displayPixels(j=0, spix=c(1,2,3)) ## Plot base pixels 1,2,3 display and their boundaries (boundary.j=0) displayPixels(0,0, spix=c(1,2,3)) ## Plot base pixels 1,2,3 by colouring their grandchildren at resolution 2 displayPixels(0,0, plot.j = 2, spix=c(1,2,3)) ## Example 2 demoNeighbours <- function(p,j) { neighbours(p, j) displayPixels(boundary.j = j, j = j, plot.j = 5, spix = neighbours(p, j), boundary.col = "gray", boundary.lwd = 1, incl.labels = neighbours(p, j), col = "blue", size = 3) rcosmo::displayPixelBoundaries(nside = 1, col = "blue", lwd = 3) } demoNeighbours(1,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.