Description Usage Arguments Value Author(s) Examples
Image plots usually codify the z values with colors. This function helps to draw an appropriate color bar into the right plot margin.
1 2 3 4 5 | drawColorBar(breaks = NULL, col = NULL, usr = par("usr"),
xleft = 0.05, xright = 0.08,
ybottom = 0.25, ytop = 0.25,
main = "z", main.cex = 1.5, main.mar = 0.01,
lab.cex = 1, lwd = 0.5, seg.len = 0.2)
|
breaks |
numeric vector. The breaks that are used to bin the
numerical range. Should be of |
col |
vector. Defines for each bin a color. |
usr |
numeric vector. Defines the plotting region in user
coordinates according to |
xleft |
real number. Sets the left coordinate as a fraction of
the width defined by |
xright |
real number. Sets the right coordinate as a fraction of
the width defined by |
ybottom |
real number. Sets the bottom coordinate as a fraction of
the height defined by |
ytop |
real number. Sets the top coordinate as a fraction of
the height defined by |
main |
string. Optional title for the color bar. |
main.cex |
real number. Character size expansion for |
main.mar |
real number. Sets the margin of the title relativ to
the color bar as a fraction of the height defined by
|
lab.cex |
real number. Character size expansion for the bar labels,
which is passed to |
lwd |
real number. Line width to draw the tick marks and box around the color bar. |
seg.len |
real number. Length of the tick marks as a fraction of
|
Returns invisible.
Simon S.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.