Learn R Programming

ddgraph (version 1.16.0)

color.legend.DDGraph: Plot color coding legend

Description

This function is a slightly modified version of function color.legend() function from plotrix package. It plots a color legend at the given coordinates. This version extends the original plotrix function with additional label and ability to plot into margins.

Usage

color.legend.DDGraph(xl, yb, xr, yt, legend, rect.col, cex=1, align="lt", gradient="x", title="", ...)

Arguments

xl
lower left corner x coordinate
yb
lower left corner y coordinate
xr
upper right corner x coordinate
yt
upper right corner y coordinate
legend
the text to be plotted below the color coding rectangle
rect.col
the color that will fill the rectangle
cex
character expansion factor for the labels
align
how to align the labels relative to the color rectangle
gradient
whether to have a horizontal (x) or vertical (y) color gradient
title
the title to be printed above the color coding rectangle
...
the additional arguments passed to text()