Learn R Programming

plotKML (version 0.8-3)

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, 
     z.lim = range(x, na.rm=TRUE, finite=TRUE), factor.labels, png.type)

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

z.lim

numeric; lower and upper limits

factor.labels

character; class names if applicable

png.type

character; PNG type

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