query2Cols: Create color vector for elements in an object of class POI

Description Usage Arguments Value Author(s) See Also Examples

Description

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].

Usage

1
query2Cols(object, value)

Arguments

object

object of class POI

value

Palette to apply. One in: 'heat','topo','cm','terrain'

Value

A vector with corresponding color to each element of POI.

Author(s)

Eduardo San Miguel Martin

See Also

POIPlot-methods,POI-class,plotPOI

Examples

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)

fisheyeR documentation built on May 2, 2019, 4:55 p.m.