logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

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

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.  The program determines the raster map’s
       category value distribution by counting cells.

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:Bargraphhistogramforelevationmap

       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:Piegraphhistogramforlandusemap

Keywords

       display, histogram, statistics

Name

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

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).

See Also

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

Source Code

       Available at: d.histogram source code (history)

       Accessed: Friday Apr 04 01:18:46 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

GRASS 8.4.1                                                                                  d.histogram(1grass)

Synopsis

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

   Flags:-n
           Display information for null cells

       -c
           Report for ranges defined in cats file (fp maps only)

       --help
           Print usage summary

       --verbose
           Verbose module output

       --quiet
           Quiet module output

       --ui
           Force launching GUI dialog

   Parameters:map=name[required]
           Raster map for which histogram will be displayed

       style=string
           Indicate if a pie or bar chart is desired
           Options: pie,bar
           Default: barcolor=name
           Color for text and axes
           Either a standard color name or R:G:B triplet
           Default: blackbgcolor=name
           Background color
           Either a standard color name, R:G:B triplet, or "none"
           Default: whitensteps=integer
           Number of steps to divide the data range into (fp maps only)
           Default: 255

See Also