kml_legend.bar {plotKML} | R Documentation |
Produces a PNG file that can be used as a screen overlay — legend bar for numeric and factor type variables.
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 = "cairo-png")
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 |
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.
Tomislav Hengl, Pierre Roudier, and Dylan Beaudette
grDevices::png
, kml-methods
, kml_layer