Description Usage Arguments Value Author(s) Examples
View source: R/Morton_combine.R
MortonGlyph generates a data matrix of png format or a class of "pixmap" which can be used to display color strings in an order of Morton curve in the space given a vector of colors
1 | MortonGlyph(col, fill = FALSE, type = c("png", "pixmap"))
|
col |
vector of colors |
fill |
logical value indicating whether the color strings repeat from the beginning if number of colors is smaller than the total length of Morton curve |
type |
string specifying the format of output. "png" means the output is a data matrix in the png format, and "pixmap" means the output is a class of pixmap. |
a data matrix of png format or a class of "pixmap" which can be used to plot. See pixmap
, writePNG
, rasterImage
Jiahua Liu, Wayne Oldford
1 2 3 4 5 6 7 8 9 | myPngmat <- MortonGlyph()
myPngmat <- MortonGlyph(col = colors())
myPngmat <- MortonGlyph(col = colors(), fill = TRUE)
writePNG(myPngmat, target = "myplot.png")
plot(0,type='n', xlim=c(0,1), ylim=c(0,1), axes = FALSE, xlab = "", ylab = "")
rasterImage(myPngmat,0,0,1,1)
mypixmap <- MortonGlyph(type = "pixmap")
mypixmap <- MortonGlyph(col = colors(), fill = TRUE, type = "pixmap")
plot(mypixmap)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.