hist.im {spatstat} | R Documentation |
Computes and displays a histogram of the pixel values in a pixel image.
The hist
method for class "im"
.
## S3 method for class 'im' hist(x, ..., probability=FALSE)
x |
A pixel image (object of class |
... |
Arguments passed to |
probability |
Logical. If |
This function computes and (by default) displays a histogram
of the pixel values in the image x
.
An object of class "im"
describes a pixel image. See im.object
)
for details of this class.
The function hist.im
is a method for the generic
function hist
for the class "im"
.
Any arguments in ...
are passed to hist.default
(for numeric valued images) or barplot
(for factor or
logical images).
For example, such arguments control the axes, and may be used to
suppress the plotting.
For numeric-valued images, an object of class "histogram"
as returned
by hist.default
. This object can be
plotted.
For factor-valued or logical images, an object of class
"barplotdata"
, which can be plotted.
This is a list with components
called counts
(contingency table of counts of the numbers of
pixels taking each possible value), probs
(corresponding relative
frequencies) and mids
(graphical x-coordinates of the
midpoints of the bars in the barplot).
Adrian Baddeley Adrian.Baddeley@csiro.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz
hist
,
hist.default
,
barplot
,
im.object
,
summary.im
.
X <- as.im(function(x,y) {x^2}, unit.square()) hist(X) hist(cut(X,3))