Description Usage Arguments Value Author(s) Examples
View source: R/PeanoHilbert_combine.R
HilbertGlyph generates a data matrix of png format or a class of "pixmap" which can be used to display color strings in an order of Hilbert curve in the space given a vector of colors
1 | HilbertGlyph(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 in col is smaller than the total length of Hilbert 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" that is used to plot. See pixmap
, writePNG
, rasterImage
Jiahua Liu, Wayne Oldford
1 2 3 4 5 6 7 8 9 | myPngmat <- HilbertGlyph()
myPngmat <- HilbertGlyph(col = colors())
myPngmat <- HilbertGlyph(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 <- HilbertGlyph(type = "pixmap")
mypixmap <- HilbertGlyph(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.