Learn R Programming

hyperSpec (version 0.98-20161118)

qplotmap: Spectra plotting with ggplot2

Description

Spectra plotting with ggplot2

Usage

qplotmap(object, mapping = aes_string(x = "x", y = "y", fill = "spc"), ...,
  func = mean, func.args = list(), map.tileonly = FALSE)

Arguments

object

hyperSpec object

mapping
...

handed to geom_tile

func

function to summarize the wavelengths

func.args

arguments to func

map.tileonly

if TRUE, mapping will be handed to geom_tile instead of ggplot.

Value

a ggplot object

Details

These functions are still experimental and may change substantially in future.

Note that qplotmap will currently produce the wrong scales if x or y are discrete.

See Also

plotmap

ggplotgeom_tile

Examples

Run this code
# NOT RUN {
qplotmap (chondro)
qplotmap (chondro) + scale_fill_gradientn (colours = alois.palette ())

## works also with discrete x or y axis:
qplotmap (chondro, mapping = aes (x = x, y = as.factor (y), fill = spc)) 
# }

Run the code above in your browser using DataLab