d.rast.leg(1grass)

πŸ’– d.rast.leg πŸ’–

okay so bestie, welcome to d.rast.leg from the GRASS User's Manual β€” it's the module that shows you a raster map AND its legend together, and honestly? it's giving organized. ✨

🌸 KEYWORDS 🌸

display, cartography, legend


✨ SYNOPSIS ✨

d.rast.leg
d.rast.leg --help
d.rast.leg [-fns] map=name  [lines=integer]   [raster=name]   [--help]
[--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags πŸŽ€

  • -f β€” Flip legend. yes. just flip it. πŸ”„
  • -n β€” Omit entries with missing label. no label, no entry, no problem πŸ’…
  • -s β€” Draw smooth gradient. fancy. gradient-ified. 🌈
  • --help β€” Print usage summary. when u need the recap 🫢
  • --verbose β€” Verbose module output. it will literally tell u everything πŸ‘‘
  • --quiet β€” Quiet module output. shhh. 🀫
  • --ui β€” Force launching GUI dialog. going full GUI, main character energy πŸ¦‹

πŸ“ Parameters πŸ“

  • map=name [required] β€” Name of raster map to display. like, required required. u gotta give it a map. 😀
  • lines=integer β€” Number of lines to appear in the legend. how much legend r we doing today πŸ’­
  • raster=name β€” Name of input raster map to generate legend from. the legend source, if u want a different one πŸ‘€

πŸ’« DESCRIPTION πŸ’«

d.rast.leg shows a raster map along with its legend. it's literally a whole production:

first it clears the entire screen, then divides it into a main (left) and a minor (right) frames, and displays a raster map in the main frame and the map legend in the minor frame. the main frame remains active when the program finishes, so when it's done, that's where u are. periodt. πŸ’…

left = map. right = legend. that's the whole vibe check. βœ…


πŸ’œ NOTES πŸ’œ

the legend may be flipped with the -f flag. πŸͺž

if the lines parameter is not given then the legend frame will display as many lines as number of categories in the map, otherwise, it will display the first lines minus 1 categories with the rest being truncated. so like, math. lines - 1. no cap. πŸ”’

the user may adjust the lines parameter or the size of graphics window to get an appropriate result. tweak until it slays. πŸŽ€

the user may specify a second raster map with the raster parameter from which the legend is generated. this is useful to visualize (time) series of raster maps with a common static legend instead of the default dynamic legend. so like, one legend to rule them all for ur series β€” iconic. ⭐

🚨 bestie listen: to remove all frames when clearing the display, use d.erase -f. like, ALL the frames. don't forget the -f or they will linger. 😭

🧚 EXAMPLE 🧚

in this example, the polar diagram of the 'aspect' angle map in the North Carolina sample dataset is generated:

g.region raster=landclass96 -p
d.rast.leg landclass96

look at her go. πŸ¦‹


🌈 SEE ALSO 🌈

d.legend, d.erase, d.rast


πŸ‘‘ AUTHORS πŸ‘‘

  • Jianping Xu, Scott Madry, Rutgers University
  • Markus Neteler

πŸ”₯ SOURCE CODE πŸ”₯

Available at: d.rast.leg source code (history)

Latest change: Friday Feb 07 19:16:09 2025 in commit: a82a39f673b97fafcfce1604dc3e6015cb96487a

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


Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual

and that's the whole page bestie β€” this was the d.rast.leg manual for GRASS 8.5.0, brought to u by the lovely people at the GRASS Development Team (Β© 2003-2026) πŸ’– go map something pretty, ily, bye 🫢✨

πŸ“¦ where this page comes from