Support top-level las argument - #737
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved positional-compatibility, replay behavior, validation, and regression-test issues remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds top-level per-call las support for axis-label orientation, including validation, theme precedence, documentation, and snapshot coverage.
Changes:
- Applies
lasoverrides during plotting and margin calculation. - Updates NEWS and API documentation.
- Adds orientation and theme-precedence tests and snapshots.
| File | Summary and final review comments |
|---|---|
R/tinyplot.R |
Adds las handling. Critical (2 votes): inserting it before log breaks existing positional calls. Moderate (1 vote): recorded graphics may replay with the restored par("las"). Nit (1 vote): documentation should not call 0 the default. |
R/sanitize_axes.R |
Validates and propagates las. Moderate (1 vote): NA/NaN can produce an unrelated assert_numeric() error. Nit (1 vote): add invalid, fractional, and ideally nonnumeric validation tests. |
NEWS.md |
Documents the new top-level las argument. |
man/tinyplot.Rd |
Updates API documentation for las. |
inst/tinytest/test-tinyAxis.R |
Adds orientation snapshots. Nit (1 vote): verify par("las") restoration and that subsequent plots are unaffected. |
inst/tinytest/_tinysnapshot/axis_las2_override.svg |
Snapshot for theme/override rendering. |
inst/tinytest/_tinysnapshot/axis_las1.svg |
Snapshot for las = 1 rendering. |
Files not reviewed (1)
- man/tinyplot.Rd: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #353