Learn R Programming

plotKML (version 0.2-4)

kml_legend.bar: Generates a legend bar (PNG file)

Description

Produces a PNG file that can be used as a screen overlay --- legend bar for numeric and factor type variables.

Usage

kml_legend.bar(x, width, height, pointsize = 14, legend.file, legend.pal, 
         zlim = range(x, na.rm=TRUE, finite=TRUE), factor.labels)

Arguments

x
numeric or factor-type vector
width
numeric; (optional) width of image in pixels
height
numeric; (optional) height of image in pixels
pointsize
numeric; point size for the plot
legend.file
PNG file name
legend.pal
character; color palette
zlim
numeric; lower and upper limits
factor.labels
character; class names if applicable

Details

When exporting raster layers to KML the legend bar is generated by default. If the width and height are not provided, the function will try to estimate them automatically.

See Also

grDevices::png, kml-methods, kml_layer