Add more features to tinyplot()#644
Conversation
There was a problem hiding this comment.
Code Review
This pull request bumps the package version to 0.16.0.7 and updates the tinyplot.estimate_means method to automatically hide redundant legends when facets are used, along with updating the corresponding documentation and examples. A logic error was identified in the redundancy check: checking if all facet variables are in the color aesthetic fails when there are multiple facet variables or when the facet formula has no variables. The check should instead verify that the color aesthetic variables are a subset of the facet variables.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request adds new arguments to tinyplot.estimate_means to allow customizing text and geom sizes, and automatically hides redundant legends when using facets. The review feedback highlights a style guide violation regarding the naming of the linewidth argument (which should be size_line), an edge case where empty facets might incorrectly hide the legend, and a performance issue when checking for non-null text sizes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
This PR extends the tinyplot()/plt() plotting path for modelbased objects by adding new customization options (text/geom sizing) and improving default behavior when faceting makes legends redundant. It also updates the related documentation and bumps the package version.
Changes:
- Add
size_*parameters to temporarily adjust base-graphics text sizes viapar()withintinyplot.estimate_means(). - Add
size_point/linewidthparameters to map totinyplotpoint/line sizing (cex/lwd) and suppress redundant legends when facets already encode the same variable. - Update documentation/examples to clarify
tinyplot()behavior and increment package version.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
R/visualisation_recipe.R |
Expands docs to clarify that tinyplot() creates a base R graphics plot that can be further modified. |
R/tinyplot.R |
Adds new sizing parameters, implements legend suppression for redundant facet legends, and applies temporary par() sizing. |
man/visualisation_recipe.estimate_predicted.Rd |
Regenerates/updates documentation to include new tinyplot() arguments and updated examples. |
DESCRIPTION |
Bumps package version. |
Files not reviewed (1)
- man/visualisation_recipe.estimate_predicted.Rd: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.