blob: 121995eb5f2bfb7a8bcd2d92e581afd4e4145128 [file] [log] [blame]
.TH IM_HISTPLOT 3 "10 May 1991"
.SH NAME
im_histplot \- graph an image of one horizontal or vertical line
.SH SYNOPSIS
#include <vips/vips.h>
int im_histplot(in, out)
.br
IMAGE *in, *out;
.SH DESCRIPTION
.B im_histplot(3)
plots a graph of a horizontal or vertical image file with
one line. It is suitable for displaying the output of histogram functions
such as im_histgr(3) and for displaying line profiles.
Note that if you try to directly plot the result of
.B im_histgr(3)
you will often get a very, very large image, since
.B im_histplot(3)
will draw an image as high (or as wide) as the largest pixel
value in the image (potentially huge). Use
.B im_histnorm(3)
to normalise the histogram maximum before plotting.
The input image should be either one horizontal line (Ysize=1) or
one vertical line (Xsize=1). If the image is FMTUCHAR, the graph is drawn
as 256 by line-length pixels. For all other unsigned integer types,
.B im_histplot(3)
finds the image maximum, and draws the graph as max by line-length pixels.
For signed integer types,
.B im_histplot(3)
finds minimum and maximum, moves min up to zero, and
draws the graph as min + max by line-lenth pixels.
For float types,
.B im_histplot(3)
finds minimum and maximum, and scales the image range so as to make the
graph square.
.SH RETURNED VALUE
The function returns 0 on success and -1 on error.
.SH SEE ALSO
im_histgr(3), im_histnorm(3), im_extract(3).
.SH COPYRIGHT
National Gallery and Birkbeck College, 1995