Skip to content

docs: enumerate the eight dir codes in facet_wrap()#6855

Open
CuiweiG wants to merge 1 commit intotidyverse:mainfrom
CuiweiG:docs/issue-6837-facet-dir
Open

docs: enumerate the eight dir codes in facet_wrap()#6855
CuiweiG wants to merge 1 commit intotidyverse:mainfrom
CuiweiG:docs/issue-6837-facet-dir

Conversation

@CuiweiG
Copy link
Copy Markdown

@CuiweiG CuiweiG commented Apr 22, 2026

Closes #6837.

teunbrand confirmed in-thread that a docs-only change is the right resolution and provided the specification for all eight valid dir codes. Each two-letter code is now documented with its starting corner and initial fill direction.

The shorthand "h" and "v" values are still accepted for backward compatibility but are no longer documented. A trailing paragraph separates grid shape (nrow, ncol) from fill order (dir), addressing the ambiguity hadley flagged earlier in the thread about whether a code like "tl" fills left-to-right or top-to-bottom first.

Local verification: the eight documented codes were cross-checked against observed panel placement via ggplot_build(p)$layout$layout on an 8-panel (2×4) test grid; all eight match the documented starting corner and fill direction.

Rewrites the `dir` argument documentation to list all eight canonical
two-letter codes with their starting corner and initial fill direction,
following the specification teunbrand provided in the issue thread.
The shorthand `"h"` and `"v"` values are retained in the code for
backward compatibility but are no longer documented.

Closes tidyverse#6837.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

facet_wrap dir = "v" behavior changed

1 participant