classRaster_hist: Histogram of raster image

histR Documentation

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 class 'ursaRaster'
hist(x, ...)

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

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.

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

Value

Function histogram returns 0L.

Author(s)

Nikita Platonov platonov@sevin.ru

See Also

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

Examples

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

ursa documentation built on Oct. 17, 2023, 5:11 p.m.