d.histogram(1grass)

d.histogram1grass

Displays a histogram in the form of a pie or bar chart for a user-specified raster map.

Usage

d.histogram

d.histogram --help

d.histogram [-nc] map=name [style=string] [color=name] [bgcolor=name] [nsteps=integer] [--help] [--verbose] [--quiet] [--ui]

Keywords

display, histogram, statistics

Overview

d.histogram displays the category-value distribution for a user-specified raster map layer, in the form of a bar chart or a pie chart. The display will be displayed in the active display frame on the graphics monitor, using the colors in the raster map layer’s color table. The program determines the raster map’s category value distribution by counting cells.

Notes

d.histogram respects the current geographic region settings and the current MASK (if one exists).

d.histogram uses the colors in the map’s color look-up table (i.e., the map’s colr or colr2 file).

Examples

Running the command below will generate the bar graph shown in the figure:

g.region raster=elevation -p
d.mon wx0
d.histogram map=elevation

Figure: Bar graph histogram for elevation map

Running the command below will generate the pie graph shown in the figure:

g.region raster=landuse96_28m -p
d.histogram map=landuse96_28m style=pie

Figure: Pie graph histogram for landuse map

Source code

Available at: d.histogram source code (history)

Accessed: Monday Feb 24 17:50:24 2025

Main index | Display index | Topics index | Keywords index | Graphical index | Full index

© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

Releases

10 releases since Debian 4.0 (Etch); the text changed 9 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10
  8. 11
  9. 12
  10. 13

Author

Dave Johnson
DBA Systems, Inc.
10560 Arrowhead Drive
Fairfax, Virginia 22030

From grass-doc 8.4.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.