plotHist: Color histogram of binned image

Description Usage Arguments Examples

View source: R/05_output_visualization.R

Description

Plots a color histogram from a dataframe as returned by getImageHist, getHistList, or extractClusters. Bars are colored according to the color of the bin.

Usage

1
2
3
4
5
6
7
8
9
plotHist(
  histogram,
  pausing = TRUE,
  color.space = "rgb",
  ref.white,
  from = "sRGB",
  main = "default",
  ...
)

Arguments

histogram

A single dataframe or a list of dataframes as returned by getLabHist, getLabHistList, or extractClusters. First three columns must be color coordinates and fourth column must be cluster size.

pausing

Logical. Pause and wait for keystroke before plotting the next histogram?

color.space

The color space ("rgb", "hsv", or "lab") in which to plot cluster histogram.

ref.white

The reference white passed to convertColorSpace; must be specified if using CIE Lab space. See convertColorSpace.

from

Display color space of image if clustering in CIE Lab space, probably either "sRGB" or "Apple RGB", depending on your computer.

main

Title for plot. If "default", the name of the cluster histogram is used.

...

Optional arguments passed to the barplot function.

Examples

1
2
3
4
5
6
color_df <- as.data.frame(matrix(rep(seq(0, 1, length.out=3), 3), nrow=3,
ncol=3))

color_df$Pct <- c(0.2, 0.5, 0.3)

colordistance::plotHist(color_df, main="Example plot")

colordistance documentation built on March 21, 2021, 1:06 a.m.