d.histogram(1)

πŸ’– d.histogram β€” the GRASS GIS User's Manual glow-up πŸ’–

okay bestie, we're doing the d.histogram(1) page and I'm actually obsessed. this is the GRASS GIS manual, and this lil icon right here? she makes histograms. pie charts AND bar charts. main character energy fr fr.


✨ NAME ✨

d.histogram β€” displays a histogram in the form of a pie or bar chart for a user-specified raster map. that's it, that's the gig πŸ’…


🏷️ KEYWORDS 🏷️

display, histogram, statistics


πŸ¦‹ SYNOPSIS πŸ¦‹

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

🌸 Flags 🌸

  • -n β€” display information for null cells (yes bestie, the nulls get a moment too)
  • -c β€” report for ranges defined in cats file (fp maps only β€” so like, floating point maps only, don't come for me)
  • --help β€” print usage summary
  • --verbose β€” verbose module output (she's chatty)
  • --quiet β€” quiet module output (she's mysterious)
  • --ui β€” force launching GUI dialog

πŸŽ€ Parameters πŸŽ€

  • map=name [required] β€” raster map for which histogram will be displayed. this one's non-negotiable, she needs a map to feed her
  • style=string β€” indicate if a pie or bar chart is desired
    • Options: pie, bar
    • Default: bar
  • color=name β€” color for text and axes
    • Either a standard color name or R:G:B triplet
    • Default: black
  • bgcolor=name β€” background color
    • Either a standard color name, R:G:B triplet, or "none"
    • Default: white
  • nsteps=integer β€” number of steps to divide the data range into (fp maps only)
    • Default: 255

πŸ‘‘ DESCRIPTION πŸ‘‘

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. and how does she know the distribution? the program determines the raster map's category value distribution by counting cells. literally just counting cells. iconic behavior.


🌈 NOTES 🌈

d.histogram respects the current geographic region settings and the current MASK (if one exists). she's polite like that.

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


⭐ 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


πŸ”₯ SEE ALSO πŸ”₯

d.colortable, d.frame, d.graph, d.linegraph, d.mon, d.polar, g.region, r.stats


πŸ’œ AUTHOR πŸ’œ

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


🧚 SOURCE CODE 🧚

Available at: d.histogram source code (history)

Accessed: Saturday Jan 17 05:40:35 2026

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


okay that's the whole page, every last crumb, no skips no cuts, we ate and left no crumbs πŸ“

and that's a wrap bestie πŸ’– this was the d.histogram(1) page from GRASS GIS 8.4.2, Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual. periodt. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from