d.frame(1grass)

πŸ’– d.frame β€” bestie edition πŸ’–

okay so real talk, d.frame is the GRASS module that manages display frames on the user's graphics monitor. that's the whole vibe. ✨

KEYWORDS: display, graphics, monitors, frame β€” yeah she's all of those πŸ’…


✨ SYNOPSIS ✨

d.frame
d.frame --help
d.frame [-cepa] frame=name  [at=bottom,top,left,right]   [--overwrite]
[--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags

  • -c β€” creates a brand new frame if it doesn't exist yet, and selects it. main character move fr.
  • -e β€” removes every frame, erases the whole screen, and dips. goodbye bestie πŸ‘‹
  • -p β€” prints the name of the current frame and bounces out. quick peek energy.
  • -a β€” prints the names of all the frames, at position included, then exits. the full roster 🌈
  • --overwrite β€” lets output files overwrite files that already exist. permission granted πŸ’…
  • --help β€” prints the usage summary. your lil map πŸ—ΊοΈ
  • --verbose β€” verbose module output. she's chatty today.
  • --quiet β€” quiet module output. she's not.
  • --ui β€” forces launching the GUI dialog. pop-up princess energy ✨

πŸ¦‹ Parameters

  • frame=name [required] β€” the frame to be selected or created (only created if you handed her the -c flag).
  • at=bottom,top,left,right β€” screen coordinates in percent, telling her where to place the frame (0,0 is lower-left, iykyk).
    • she only cares about this when the -c or --overwrite flag is given.
    • Options: 0-100

🌸 DESCRIPTION 🌸

So d.frame manages display frames on the current user's graphics monitor. whatever graphics monitor you're currently pointing GRASS display output at (that's the one defined by the d.mon module, bestie) β€” that's where your graphics get displayed, inside rectangular frames. this module is the one creating and managing those frames. periodt.

⚠️ and listen, this part matters: GRASS frame contents are not retained when one frame covers another. you genuinely cannot shuffle frames from top to bottom and then back again. it does not work like that. frames simply define rectangular areas on the screen where subsequent drawing will occur. that's it, that's the whole job. 😭

πŸ’… NOTES πŸ’…

the coordinates for the at option are stated in the form top,bottom,left,right, and the values are in percent. here's the tea:

  • the upper-left corner of the graphics monitor is always at location 0,0
  • the monitor's lower-right corner is always at 100,100

and if you've created multiple display frames that overlap one another? whatever you display in the active frame will overwrite those portions of the underlying frame where the frames overlap. no cap. the top one wins, every time. πŸ‘‘


πŸ”₯ EXAMPLE πŸ”₯

# start a new graphics monitor, the data will be rendered to
# /tmp/map.png image output file of size 600x540px
d.mon cairo out=/tmp/map.png width=600 height=540 --o
# set up region
g.region raster=elevation
# remove all frames and erase the current graphics monitor
d.frame -e
# create a first frame and display 'landuse96_28m' raster map including text label
# order: bottom,top,left,right - in percent
d.frame -c frame=first at=0,50,0,50
d.rast landuse96_28m
d.text text='Landuse' bgcolor=220:220:220 color=black size=6
# create a second frame and display 'streams' vector map
d.frame -c frame=second at=0,50,50,100
d.vect streams color=blue
d.text text='Streams' bgcolor=220:220:220 color=black size=6
# create a third frame and display 'elevation' raster map including text label and scale
d.frame -c frame=third at=50,100,0,50
d.rast elevation
d.text text='Elevation' bgcolor=220:220:220 color=black size=6
d.barscale at=0,10 style=line bgcolor=none
# create a fourth frame and display RGB composition map including text label
d.frame -c frame=fourth at=50,100,50,100
d.rgb red=lsat7_2002_30 green=lsat7_2002_20 blue=lsat7_2002_10
d.text text='RGB true colors' bgcolor=220:220:220 color=black size=6
# release the current graphics monitor
d.mon -r

Figure: d.frame example πŸ–ΌοΈ (four quadrants, four frames, absolutely ate 🍽️)


🫢 SEE ALSO 🫢

  • d.erase
  • d.info
  • d.mon
  • d.redraw

GRASS environment variables for rendering (GRASS_RENDER_FRAME) β€” yes queen, go look at those too. 🌟


πŸ‘‘ AUTHORS πŸ‘‘

Martin Landa, Czech Technical University in Prague, Czech Republic πŸ‡¨πŸ‡Ώ

Based on d.frame from GRASS 6:

  • James Westervelt, U.S. Army Construction Engineering Research Laboratory
  • Michael Shapiro, U.S. Army Construction Engineering Research Laboratory

legends, all of them. πŸ’œ


πŸ’Ύ SOURCE CODE πŸ’Ύ

Available at: d.frame source code (history)

Latest change: Thursday Nov 06 22:27:54 2025 in commit: 298b38614712934179355ea767403d6bfea8f5f9

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 πŸŽ€ take care of your frames, don't stack them expecting to un-stack them, and remember β€” this was GRASS 8.5.0, page d.frame(1grass), last touched around that Nov 06 2025 commit. mwah πŸ’‹πŸ’–βœ¨

πŸ“¦ where this page comes from