Skip to content

params.Frame: Add parameters for 3-D plots#4594

Open
seisman wants to merge 6 commits intomainfrom
codex/frame-3d-modifiers
Open

params.Frame: Add parameters for 3-D plots#4594
seisman wants to merge 6 commits intomainfrom
codex/frame-3d-modifiers

Conversation

@seisman
Copy link
Copy Markdown
Member

@seisman seisman commented Apr 19, 2026

This PR adds parameters for -B modifiers related to 3-D plots:

  • +b: box
  • +w: wall_pen
  • +x: yzfill
  • +y: xzfill
  • +z: xyfill

GMT uses pen for +b (xref: https://github.com/GenericMappingTools/gmt/blob/ac580b28da697232ae21cfa2ec102610572af2d8/src/gmt_common_longoptions.h#L72), but I feel pen is too general, and it's also a little misleading because it only sets pen for x-z and y-z planes, not the frame pen for the x-y plane.

Example

import pygmt
from pygmt.params import Axis, Frame

fig = pygmt.Figure()
fig.basemap(
    region=(0, 1, 0, 2, 0, 3),
    projection="X10c/10c",
    zsize="5c",
    perspective=(120, 30),
    frame=Frame(
        axes="WSENZ",
        axis=True,
        zaxis=True,
        box=True,
        wall_pen="1p,red",
        xzfill="lightgreen",
        xyfill="lightblue",
        yzfill="lightyellow",
    )
)
fig.show()
map

Related to #4588

@seisman seisman changed the title Add 3-D Frame modifiers params.Frame: Add parameters for 3-D plots Apr 19, 2026
@seisman seisman added enhancement Improving an existing feature needs review This PR has higher priority and needs review. labels Apr 19, 2026
@seisman seisman added this to the 0.19.0 milestone Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improving an existing feature needs review This PR has higher priority and needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant