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

# d.barscale(1grass)

Displays a barscale on the graphics monitor.

## NAME

**d.barscale**  - Displays a barscale on the graphics monitor.

## KEYWORDS

display, cartography

## SYNOPSIS

**d.barscale**\
 **d.barscale --help**\
 **d.barscale** \[-**ftn**\]  \[**style**=*string*\]   \[**at**=*x,y*\]   \[**length**=*integer*\]   \[**units**=*string*\]   \[**label**=*string*\]   \[**segment**=*integer*\]   \[**color**=*name*\]   \[**bgcolor**=*name*\]   \[**text\_position**=*string*\]   \[**width\_scale**=*float*\]   \[**font**=*string*\]   \[**fontsize**=*float*\]   \[**path**=*name*\]   \[**charset**=*string*\]   \[--**help**\]  \[--**verbose**\]  \[--**quiet**\]  \[--**ui**\]

### Flags:

- **-f**

  Use feet/miles instead of meters

- **-t**

  Draw the scale bar without text

- **-n**

  Display north-arrow symbol.

- **--help**

  Print usage summary

- **--verbose**

  Verbose module output

- **--quiet**

  Quiet module output

- **--ui**

  Force launching GUI dialog

### Parameters:

- **style**=*string*

  Type of barscale to draw\
   Options: *classic, line, solid, hollow, full\_checker, part\_checker, mixed\_checker, tail\_checker, up\_ticks, down\_ticks, both\_ticks, arrow\_ends*\
   Default: *classic*\
    **classic**: Classic style\
    **line**: Line style\
    **solid**: Solid style\
    **hollow**: Hollow style\
    **full\_checker**: Full checker style\
    **part\_checker**: Part checker style\
    **mixed\_checker**: Mixed checker style\
    **tail\_checker**: Tail checker style\
    **up\_ticks**: Up ticks style\
    **down\_ticks**: Down ticks style\
    **both\_ticks**: Both ticks style\
    **arrow\_ends**: Arrow ends style

- **at**=*x,y*

  Screen coordinates of the rectangle’s top-left corner\
   (0,0) is lower-left of the display frame\
   Options: *0-100*\
   Default: *0.0,10.0*

- **length**=*integer*

  Length of barscale in map units\
   Options: *0-*\
   Default: *0*

- **units**=*string*

  Barscale units to display\
   Options: *meters,  kilometers,  feet,  miles*

- **label**=*string*

  Custom label of unit

- **segment**=*integer*

  Number of segments\
   Options: *1-100*\
   Default: *10*

- **color**=*name*

  Bar scale and text color\
   Either a standard color name or R:G:B triplet\
   Default: *black*

- **bgcolor**=*name*

  Background color (drawn behind the bar)\
   Either a standard color name, R:G:B triplet, or "none"\
   Default: *white*

- **text\_position**=*string*

  Text position\
   Options: *under, over, left, right*\
   Default: *right*

- **width\_scale**=*float*

  Scale factor to change bar width\
   Options: *0.5-100*\
   Default: *1*

- **font**=*string*

  Font name

- **fontsize**=*float*

  Font size\
   Options: *1-360*\
   Default: *12*

- **path**=*name*

  Path to font file

- **charset**=*string*

  Text encoding (only applicable to TrueType fonts)

## DESCRIPTION

*d.barscale* displays a barscale on the graphics monitor at the given screen coordinates. If no coordinates are given it will draw the barscale in the bottom left of the display.

The barscale can drawn in a number of styles (see **style** parameter for their previews).

## NOTE

*d.barscale* will not work with Lat/Lon coordinate reference system as the horizontal scale distance changes with latitude. Try *d.grid* instead.

## SEE ALSO

*d.graph,* *d.grid,* *d.legend,* *d.northarrow,* *g.region*

## AUTHORS

Unknown, from USACE/CERL.\
 Major rewrite for GRASS 7 by Hamish Bowman

## SOURCE CODE

Available at: d.barscale 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
