hex.legend {hexbin} | R Documentation |
Plots the legend for the plot.hexbin function. Provides a legend indicating the count representations.
hex.legend(legend, ysize, lcex, inner, style = "colorscale", minarea = 0.05, maxarea = 0.8, mincnt = 1, maxcnt, trans = NULL, inv = NULL, colorcut, density = NULL, border = FALSE, pen = NULL, colramp = function(n){ LinGray(n,beg = 90,end = 15) })
legend |
positive number giving width of the legend in inches. |
ysize |
height of legend in inches |
lcex |
the characters expansion size for the text in the legend,
see par(cex=) . |
inner |
the inner diameter of a hexagon in inches. |
style |
the hexagon style, one of
("c","lat","cm","nest","nestcm"), see hexagons . |
minarea, maxarea |
fraction of the cell area for the lowest and largest count, respectively. |
mincnt, maxcnt |
minimum and maximum count accepted in plot . |
trans |
a transformation for the counts such as sqrt() . |
inv |
the inverse transformation. |
colorcut |
numeric vector of values covering [0, 1] the determine hexagon color classes boundaries and hexagon legend size boundaries. |
border |
argument for polygon() . Draw the border
for each hexagon. |
density |
argument for polygon() filling.
A 0 causes the polygon not to be filled. |
pen |
Polygon() col argument. Determines the color with which the polygon will be filled |
colramp |
function accepting an integer n as an argument and
returning n colors. |
plot.hexbin
calls this hex.legend
to produce a legend by
setting the graphics parameters, so hex.legend
itself is not a
standalone function.
The legend function is preliminary. Later version will include refinements and handle extreme cases (small and large) for cell size and counts.
See the Details section of hexagons
's help page.
This function does not return any value.
Dan Carr <dcarr@voxel.galaxy.gmu.edu>
ported by Nicholas Lewin-Koh <kohnicho@comp.nus.edu.sg>
see in hexagons
.
hexbin
, smooth.hexbin
, erode.hexbin
,
hcell
, hcell2xy
,
plot.hexbin
, hboxplot
, hdiffplot
,
hmatplot
, hexagons
# Not a stand alone function # Call from plot.hexbin hex.legend(legend = 2, ysize = 1,lcex=8,inner=0.2, maxcnt = 100, colorcut = c(0.5,0.5))