Learn R Programming

daltoolbox (version 1.3.717)

plot_pixel: Plot pixel visualization

Description

Pixel-oriented visualization of a numeric matrix or data.frame.

Usage

plot_pixel(
  data,
  colors = NULL,
  title = NULL,
  label_x = "sample",
  label_y = "Attributes"
)

Value

returns a ggplot2::ggplot graphic

Arguments

data

numeric matrix or data.frame

colors

optional vector of colors for the fill gradient

title

optional plot title

label_x

x-axis label

label_y

y-axis label

Details

Renders a heatmap-like plot where each cell is a pixel. Useful for multivariate inspection.

Examples

Run this code
data(iris)
grf <- plot_pixel(as.matrix(iris[,1:4]), title = "Iris")
plot(grf)

Run the code above in your browser using DataLab