## S3 method for class 'colourmap':
plot(x, ...,
main, xlim = NULL, ylim = NULL, vertical = FALSE, axis = TRUE)
"colourmap"
.image.default
.x
values for the location of the
colour ribbon.y
values for the location of the
colour ribbon.FALSE
) or a vertical strip
(TRUE
)."colourmap"
.
An object of this class
(created by the function colourmap
)
represents a colour map or
colour lookup table associating colours with each data value. The command plot.colourmap
displays the colour map as a colour
ribbon. This plot can be useful on its own to inspect the colour map.
To annotate an existing plot with an explanatory colour ribbon,
specify add=TRUE
and use the arguments xlim
and/or ylim
to control the physical position of the ribbon
on the plot.
colourmap
co <- colourmap(rainbow(100), breaks=seq(-1,1,length=101))
plot(co)
plot(co, vertical=TRUE)
ca <- colourmap(rainbow(8), inputs=letters[1:8])
plot(ca)
Run the code above in your browser using DataLab