Learn R Programming

nandb (version 0.2.1)

ArrArrHexPlot: Plot the values in two arrays against each other.

Description

Plot the values of two arrays of identical dimension against each other using a hexagonal heatmap.

Usage

ArrArrHexPlot(arr.x, arr.y, bins = 60, log.trans = FALSE, colours = NULL,
  limits = NULL, breaks = NULL, include.breaks = NULL)

Arguments

arr.x, arr.y

The two arrays. The arrx values will be along the \(x\) axis and the arry values along the \(y\) axis.

bins
log.trans

Do you want to log-transform the colour scaling?

colours

Here you may specify the colours (to be passed to ggplot2::scale_fill_gradientn()) to create the continuous colour band. It is specified as a character vector, with the colors specified either as the values in colors() or as in the value of the rgb() function. Note that this allows the use of grDevices::rainbow() and friends. The default uses viridis::viridis().

limits

A numeric vector of length two providing limits of the scale.

breaks

Where do you want tick marks to appear on the legend colour scale?

include.breaks

If you don't want to specify all the breaks, but you want some specific ones to be included on the legend colour scale, specify those specific ones here.

Value

This is a ggplot2 object and can be manipulated thus.

Examples

Run this code
# NOT RUN {
library(EBImage)
img <- ReadImageData(system.file('extdata', '50.tif', package = 'nandb'))
display(normalize(img[, , 1]), method = 'raster')
brightness <- Brightness(img, tau = NA, mst = "Huang")
mean.intensity <- MeanPillars(img)
ArrArrHexPlot(mean.intensity, brightness) +
ggplot2::labs(x = 'intensity', y = 'brightness')

# }

Run the code above in your browser using DataLab