Description Usage Arguments Value Author(s) See Also Examples
query2Cols
assigns a color to every element in the POI, accordingly with its cos.query.docs value.
Valid palettes: 'heat', 'topo', 'cm' and 'terrain'.
Note that cos.query.docs value must be in the range [0-1].
1 | query2Cols(object, value)
|
object |
object of class POI |
value |
Palette to apply. One in: 'heat','topo','cm','terrain' |
A vector with corresponding color to each element of POI.
Eduardo San Miguel Martin
POIPlot-methods
,POI-class
,plotPOI
1 2 3 4 5 6 7 8 | data(USArrests)
usaPOI = POICreate('POI')
usaPOI@cos.query.docs <- USArrests[,3] / max(USArrests[,3]) # urban population (1 high - 0 low)
usaPOI@colores <- query2Cols(usaPOI, 'terrain')
plot(usaPOI@cos.query.docs, col = usaPOI@colores)
usaPOI@colores <- query2Cols(usaPOI, 'heat')
plot(usaPOI@cos.query.docs, col = usaPOI@colores)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.