plot_legend: Plot a color legend for a heatmap

Description Usage Arguments Value See Also Examples

View source: R/PlotHeatmapList.R

Description

Plot a color legend for a heatmap

Usage

1

Arguments

scale

Numeric vector contain min and max for the scale

options

heatmapOptions passed as a list

This function plots a vertical color scale (or legend). With the default parameters, it looks good at about 1/5 the width of a heatmap, about 1cm x 10cm. This function only plots the legend, it does not set margin parameters.

Value

invisible(0)

See Also

plotHeatmapList

Examples

1
2
3
4
5
data(HeatmapExamples)
opts = heatmapOptions()
opts$color = "Rainbow"
par(mai=opts$legend.mai)
plot_legend(c(0,1), opts)

Example output

Attaching package: 'heatmaps'

The following object is masked from 'package:base':

    scale

heatmaps documentation built on Nov. 8, 2020, 7:32 p.m.