d.frame(1)

πŸ’– d.frame β€” bestie's guide to display frames πŸ’–

okay so. this is d.frame from the GRASS GIS User's Manual, and it manages display frames on the user's graphics monitor. that's the whole vibe. frames. monitors. we love her. πŸŽ€

KEYWORDS: display, graphics, monitors, frame


✨ SYNOPSIS ✨

no cap, here's the shape of it:

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

🚩 Flags 🚩

  • -c β€” create a new frame if it doesn't exist and select it. new frame, who dis πŸ’…
  • -e β€” remove all frames, erase the screen and exit. scorched earth era 😭
  • -p β€” print the name of the current frame and exit. just tell me who's on stage rn
  • -a β€” print names of all frames, including the at position, and exit. full roster reveal πŸ‘‘
  • --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 πŸŽ€

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

🌸 DESCRIPTION 🌸

so d.frame manages display frames on the current user's graphics monitor. graphics get displayed in rectangular frames on whatever graphics monitor you're currently directing GRASS display output to (that's the one defined by the d.mon module, mwah). these frames are created and managed with this module. periodt.

⚠️ not me being the bearer of bad news but: GRASS frame contents are not retained when one frame covers another. you cannot shuffle frames from top to bottom and then back again. sorry bestie πŸ’€ they simply define rectangular areas on the screen where subsequent drawing will occur. that's it, that's the job.

πŸ“ NOTES πŸ“

the coordinates for the at option are stated in the form top,bottom,left,right, and the values are in percent. the upper-left corner of the graphics monitor always is at location 0,0, while the monitor's lower-right corner is always at 100,100. iconic, fixed, unbothered.

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 these frames overlap. so like, stacking is real and so are the consequences 🫢


🧚 EXAMPLE 🧚

here's the whole thing, verbatim, no edits, because we respect the source:

# 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 πŸ¦‹


πŸ‘€ SEE ALSO πŸ‘€

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

GRASS environment variables for rendering (GRASS_RENDER_FRAME) β€” yes, that one, go look at it πŸ”₯


πŸ‘‘ 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

πŸ’œ SOURCE CODE πŸ’œ

available at: d.frame source code (history)

accessed: Saturday Jan 17 05:41:51 2026

main index | display index | topics index | keywords index | graphical index | full index

Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual


and that's the whole page, bestie β€” this was d.frame(1) from the GRASS 8.4.2 manual, so go forth and frame things, no cap βœ¨πŸ’–πŸŒˆ

πŸ“¦ where this page comes from