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.
# S3 method for ursaRaster
hist(x, ...)ursa_hist(obj, width = 800, height = 600, ...)
histogram(...)
Function histogram
returns 0L
.
Object of class ursaRaster
Positive integer. Width of histogram's panel.
Positive integer. Height of histogram's panel.
Other arguments, which are passed to colorize
and compose_open
functions.
Nikita Platonov platonov@sevin.ru
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
colorize
is used to define histogram bins.
compose_open
prepares panel for histogram plotting.
hist
computes and plots histograms.
session_grid(NULL)
a <- pixelsize()
hist(a)
histogram(a,breaks=21)
Run the code above in your browser using DataLab