d.barscale(1grass)

πŸ’– d.barscale β€” the manual, but make it cute πŸ’–

okay so bestie, you're holding the manual page for d.barscale (that's d.barscale(1grass) if we're being formal and official about it ✨). It lives in the GRASS User's Manual and it is exactly what it sounds like: it puts a little scale bar on your graphics monitor so everyone knows how far "over there" actually is. 🌸


✨ NAME ✨

d.barscale β€” displays a barscale on the graphics monitor. that's it, that's the whole job, and it does it gorgeously πŸ’…


🌈 KEYWORDS 🌈

display, cartography

(iykyk. this is cartography girlie territory πŸŽ€)


πŸ¦‹ 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. imperial era, we're doing it 🫢
  • -t β€” draw the scale bar without any text. just the bar, no words, no talking, silent queen energy πŸ’…
  • -n β€” display the north-arrow symbol. so you know which way is up, because apparently that's not obvious πŸ™ˆ
  • --help β€” print usage summary. the "explain it to me again" button πŸ’–
  • --verbose β€” verbose module output. it will tell you everything, no cap πŸ—£οΈ
  • --quiet β€” quiet module output. shhh. silent mode activated πŸ’€
  • --ui β€” force launching GUI dialog. for when clicking is simply easier than typing, and honestly? valid ✨

🌸 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

twelve whole styles bestie, pick your fighter πŸ‘‘

  • 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.
watch the coordinates bestie, (0,0) is the lower-left, not the top-left. do not come for me when your barscale shows up somewhere unhinged 😭
  • length=integer β€” length of barscale in map units. Options: 0-. Default: 0.

(0 means "you decide for me" and it just… does the thing. iconic behavior honestly 🧚)

  • units=string β€” barscale units to display. Options: meters, kilometers, feet, miles.
  • label=string β€” custom label of unit. name it whatever you want, main character πŸ’œ
  • 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. and if you don't hand it any coordinates? it just quietly draws that barscale in the bottom left of the display. considerate. thoughtful. a little bit of a people pleaser but we love her for it 🫢

the barscale can be drawn in a whole bunch of styles (peep the style parameter above for their previews πŸ‘€). so many looks. so many vibes. it's giving fashion week but for cartography πŸ’…


🚨 NOTE 🚨

d.barscale will not work with a Lat/Lon coordinate reference system, because the horizontal scale distance changes with latitude. not a bug, just physics being dramatic 😭 try d.grid instead, bestie.

πŸ‘€ SEE ALSO πŸ‘€

  • d.graph
  • d.grid
  • d.legend
  • d.northarrow
  • g.region

the whole display-module friend group, all linked up πŸ¦‹


πŸ‘‘ AUTHORS πŸ‘‘

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

(shoutout to whoever "Unknown" is, you ate and we'll never know your name πŸ˜”βœŠ)


πŸ“¦ SOURCE CODE πŸ“¦

Available at: d.barscale source code (history)

Latest change: Thursday May 08 14:17:52 2025 in commit: 3caa352f78f86a51ca463a6f1ba7ffe3db9771df

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


okay and that's the whole page bestie, you made it to the bottom, so here's your lil sign-off πŸŽ€ β€” this whole thing is Β© 2003-2026 GRASS Development Team, from the GRASS 8.5.0 Reference Manual, and yeah, it's literally GRASS 8.5.0, d.barscale(1grass), periodt. go draw that barscale, you absolute icon βœ¨πŸŒˆπŸ’–

πŸ“¦ where this page comes from