Learn R Programming

ursa (version 3.10.4)

hist: Histogram of raster image

Description

Two functions for manipulation with histograms. In function hist values of ursaRaster objects are passed to generic function hist, which allows compute and optionally plot histograms. Other function, histogram, plots histogram in the graphical device png directly.

Usage

# S3 method for ursaRaster
hist(x, ...)

ursa_hist(obj, width = 800, height = 600, ...) histogram(...)

Value

Function histogram returns 0L.

Arguments

obj, x

Object of class ursaRaster

width

Positive integer. Width of histogram's panel.

height

Positive integer. Height of histogram's panel.

...

Other arguments, which are passed to colorize and compose_open functions.

Author

Nikita Platonov platonov@sevin.ru

Details

histogram is synonym of ursa_hist.

Function hist for ursaRaster object is defined as hist(ursa_value(obj),...).
In the function histogram each bin corresponds to category. The image splitting to categories is realized via colorize function. The panel of plotting is constucted using artificial coordinate system without geographical projection. The purpose of compose_open function is prepare layout for plotting raster images; in the case of histogram, the purpose of this function is prepare layout for plotting histogram

See Also

colorize is used to define histogram bins.
compose_open prepares panel for histogram plotting.
hist computes and plots histograms.

Examples

Run this code
session_grid(NULL)
a <- pixelsize()
hist(a)
histogram(a,breaks=21)

Run the code above in your browser using DataLab