---
name: "d.vect.thematic"
section: "1grass"
platform: "linux"
package: "grass-doc"
version: "8.4.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/d.vect.thematic"
---

# d.vect.thematic(1grass)

Displays a thematic vector map in the active graphics frame.

## NAME

**d.vect.thematic**  - Displays a thematic vector map in the active graphics frame.

## KEYWORDS

display, cartography, choropleth map, legend

## SYNOPSIS

**d.vect.thematic**\
 **d.vect.thematic --help**\
 **d.vect.thematic** \[-**lnes**\] **map**=*name*  \[**layer**=*string*\]  **column**=*name*  \[**breaks**=*string*\[,*string*,...\]\]   \[**algorithm**=*string*\]   \[**nclasses**=*integer*\]  **colors**=*string*\[,*string*,...\]  \[**where**=*sql\_query*\]   \[**boundary\_width**=*integer*\]   \[**boundary\_color**=*name*\]   \[**icon**=*string*\]   \[**size**=*float*\]   \[**icon\_line**=*string*\]   \[**icon\_area**=*string*\]   \[**legend\_title**=*string*\]   \[**legendfile**=*name*\]   \[--**overwrite**\]  \[--**help**\]  \[--**verbose**\]  \[--**quiet**\]  \[--**ui**\]

### Flags:

- **-l**

  Create legend information and send to stdout

- **-n**

  Do not draw map, only output the legend information

- **-e**

  \[DEPRECATED\] When printing legend info, include extended statistical info from classification algorithm

- **-s**

  Do not show this layer in vector legend

- **--overwrite**

  Allow output files to overwrite existing files

- **--help**

  Print usage summary

- **--verbose**

  Verbose module output

- **--quiet**

  Quiet module output

- **--ui**

  Force launching GUI dialog

### Parameters:

- **map**=*name* **\[required\]**

  Name of vector map\
   Or data source for direct OGR access

- **layer**=*string*

  Layer number or name\
   Layer number. If -1, all layers are displayed.\
   Default: *1*

- **column**=*name* **\[required\]**

  Name of attribute column to be classified

- **breaks**=*string\[,string*,...\]

  Class breaks, without minimum and maximum

- **algorithm**=*string*

  Algorithm to use for classification\
   Options: *int, std, qua, equ, dis*\
   **int**: simple intervals\
   **std**: standard deviations\
   **qua**: quantiles\
   **equ**: equiprobable (normal distribution)

- **nclasses**=*integer*

  Number of classes to define

- **colors**=*string\[,string*,...\] **\[required\]**

  Colors (one per class)

- **where**=*sql\_query*

  WHERE conditions of SQL statement without ’where’ keyword\
   Example: income \< 1000 and population \>= 10000

- **boundary\_width**=*integer*

  Boundary width\
   Default: *1*

- **boundary\_color**=*name*

  Boundary color\
   Either a standard color name, R:G:B triplet, or "none"\
   Default: *black*

- **icon**=*string*

  Point and centroid symbol\
   Options: *basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3, basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3, basic/diamond, basic/hexagon, basic/marker, basic/octagon, basic/pin, basic/pin\_dot, basic/point, basic/pushpin, basic/star, basic/triangle, basic/x, demo/muchomurka, demo/smrk, extra/4pt\_star, extra/adcp, extra/airport, extra/alpha\_flag, extra/bridge, extra/dim\_arrow, extra/dive\_flag, extra/fiducial, extra/fish, extra/half-box, extra/half-circle, extra/offbox\_ne, extra/offbox\_nw, extra/offbox\_se, extra/offbox\_sw, extra/pentagon, extra/ping, extra/ring, extra/simple\_zia, extra/target, geology/circle\_cross, geology/half-arrow\_left, geology/half-arrow\_right, geology/strike\_box, geology/strike\_circle, geology/strike\_cleavage, geology/strike\_half-bowtie, geology/strike\_line, geology/strike\_parallel, geology/strike\_triangle, legend/area, legend/area\_curved, legend/line, legend/line\_crooked, n\_arrows/basic\_compass, n\_arrows/fancy\_compass, n\_arrows/n\_arrow1a, n\_arrows/n\_arrow1b, n\_arrows/n\_arrow2, n\_arrows/n\_arrow3, n\_arrows/n\_arrow4, n\_arrows/n\_arrow5, n\_arrows/n\_arrow6, n\_arrows/n\_arrow7a, n\_arrows/n\_arrow7b, n\_arrows/n\_arrow8a, n\_arrows/n\_arrow8b, n\_arrows/n\_arrow9*\
   Default: *basic/x*

- **size**=*float*

  Symbol size\
   Default: *5*

- **icon\_line**=*string*

  Legend symbol for lines\
   Options: *basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3, basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3, basic/diamond, basic/hexagon, basic/marker, basic/octagon, basic/pin, basic/pin\_dot, basic/point, basic/pushpin, basic/star, basic/triangle, basic/x, demo/muchomurka, demo/smrk, extra/4pt\_star, extra/adcp, extra/airport, extra/alpha\_flag, extra/bridge, extra/dim\_arrow, extra/dive\_flag, extra/fiducial, extra/fish, extra/half-box, extra/half-circle, extra/offbox\_ne, extra/offbox\_nw, extra/offbox\_se, extra/offbox\_sw, extra/pentagon, extra/ping, extra/ring, extra/simple\_zia, extra/target, geology/circle\_cross, geology/half-arrow\_left, geology/half-arrow\_right, geology/strike\_box, geology/strike\_circle, geology/strike\_cleavage, geology/strike\_half-bowtie, geology/strike\_line, geology/strike\_parallel, geology/strike\_triangle, legend/area, legend/area\_curved, legend/line, legend/line\_crooked, n\_arrows/basic\_compass, n\_arrows/fancy\_compass, n\_arrows/n\_arrow1a, n\_arrows/n\_arrow1b, n\_arrows/n\_arrow2, n\_arrows/n\_arrow3, n\_arrows/n\_arrow4, n\_arrows/n\_arrow5, n\_arrows/n\_arrow6, n\_arrows/n\_arrow7a, n\_arrows/n\_arrow7b, n\_arrows/n\_arrow8a, n\_arrows/n\_arrow8b, n\_arrows/n\_arrow9*\
   Default: *legend/line*

- **icon\_area**=*string*

  Legend symbol for areas\
   Options: *basic/arrow, basic/arrow1, basic/arrow2, basic/arrow3, basic/box, basic/circle, basic/cross1, basic/cross2, basic/cross3, basic/diamond, basic/hexagon, basic/marker, basic/octagon, basic/pin, basic/pin\_dot, basic/point, basic/pushpin, basic/star, basic/triangle, basic/x, demo/muchomurka, demo/smrk, extra/4pt\_star, extra/adcp, extra/airport, extra/alpha\_flag, extra/bridge, extra/dim\_arrow, extra/dive\_flag, extra/fiducial, extra/fish, extra/half-box, extra/half-circle, extra/offbox\_ne, extra/offbox\_nw, extra/offbox\_se, extra/offbox\_sw, extra/pentagon, extra/ping, extra/ring, extra/simple\_zia, extra/target, geology/circle\_cross, geology/half-arrow\_left, geology/half-arrow\_right, geology/strike\_box, geology/strike\_circle, geology/strike\_cleavage, geology/strike\_half-bowtie, geology/strike\_line, geology/strike\_parallel, geology/strike\_triangle, legend/area, legend/area\_curved, legend/line, legend/line\_crooked, n\_arrows/basic\_compass, n\_arrows/fancy\_compass, n\_arrows/n\_arrow1a, n\_arrows/n\_arrow1b, n\_arrows/n\_arrow2, n\_arrows/n\_arrow3, n\_arrows/n\_arrow4, n\_arrows/n\_arrow5, n\_arrows/n\_arrow6, n\_arrows/n\_arrow7a, n\_arrows/n\_arrow7b, n\_arrows/n\_arrow8a, n\_arrows/n\_arrow8b, n\_arrows/n\_arrow9*\
   Default: *legend/area*

- **legend\_title**=*string*

  Thematic map title

- **legendfile**=*name*

  \[DEPRECATED\] Output legend file

## DESCRIPTION

*d.vect.thematic* draws thematic choropleth vector maps based on an attribute column or an expression involving several columns. It takes a list of class **breaks** (excluding the minimum and maximum values) and a list of **colors** to apply to the classes (has to be the number of class breaks + 1).

Instead of a list of class breaks, the user can also chose a classification **algorithm** and a number of classes (**nbclasses**). See the *v.class* for more information on these different algorithms.

## NOTES

The **-l** flag instructs the module to print legend information in vector legend format as described in *d.legend.vect* to standard output for further use in graphical software. When combined with the verbose flag, the legend information will be extended with some additional statistical information. If the **-n** flag is set, the module will only print the legend information without drawing the map.

Option **legendfile**, is deprecated, instead use the GRASS\_LEGEND\_FILE environmental variable (see *d.legend.vect*) to save legend into a file. Flag **-e** is deprecated, instead use verbose flag.

## EXAMPLES

### Thematic map with classes

```
d.vect.thematic -l map=communes3 column=pop \
  breaks=111393.250000,222785.500000,334177.750000 \
  colors="255:0:0,0:255:0,0:0:255,0,0,0"
```

### Thematic map with calculated class breaks

The following example uses a calculated attribute (`density =` `pop/area`) and the standard deviation algorithm to calculate class breaks for 5 classes:\

```
d.vect.thematic -l map=communes2 column=pop/area algorithm=std \
  nbclasses=5 colors="0:0:255,50:100:255,255:100:50,255:0:0,156:0:0"
```

### Thematic map with legend

Example for the North Carolina sample dataset, colorizing basin polygons by average elevation and displaying school capacity:\

```
# create watersheds from elevation map
g.region raster=elevation
r.watershed elevation=elevation threshold=10000 basin=basins_10k
# convert raster to vector
r.to.vect input=basins_10k output=basins_10k type=area column=basin_num
# upload raster statistics to each polygon in vector map
v.rast.stats map=basins_10k raster=elevation column_prefix=elev
# open a graphical display
d.mon wx0
# draw thematic polygons and specify legend title
d.vect.thematic map=basins_10k column=elev_average algorithm=int \
  nclasses=5 colors=0:195:176,39:255:0,251:253:0,242:127:11,193:126:60 \
  legend_title="Average elevation (m)"
# draw thematic points and specify legend title
d.vect.thematic map=schools_wake@PERMANENT column=CORECAPACI algorithm=std \
  nclasses=3 colors=149:203:255,45:143:240,0:81:161 icon=basic/circle size=15 \
  legend_title="School capacity"
# and finally draw legend
d.legend.vect -b at=2,80 font=Sans symbol_size=25
```

*Thematic map of average elevation and school capacity*

## SEE ALSO

*v.class,* *d.legend.vect,* *d.vect,* *d.graph,* *v.univar*

Check also Python module from AddOns: *d.vect.thematic2*

## AUTHOR

Moritz Lennert

## SOURCE CODE

Available at: d.vect.thematic source code (history)

Accessed: Monday Feb 24 17:50:28 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
