Description Usage Arguments Details Value See Also Examples
Add a simple legend in form of a color bar to a plot.
1 |
breaks |
a vector of breaks defining a set of intervals for the data |
col |
a vector of colors corresponding to the intervals. |
side |
integer between 1 and 4, indicating on which side of the main plot the legend is supposed to be drawn. Standard interpretation: 1 = below, continuing clock-wise. |
This is an extremely simple way of giving a visual impression of what
numerical values correspond to a given color. The actual plot is done via a
call to image
and axis
.
The locations of the ticks returned by the call to
axis
plot.annHeatmap
, niceBreaks
,
g2r.colors
1 2 | ## Set up data
doLegend(1:9, g2r.colors(8), 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.