Conversation
Replace all old function names in examples/, vignettes/, and NEWS.md: - scale_of() -> scale_x(), scale_y(), scale_color(), scale_size() - axis_of() -> axis_x(), axis_y() - legend_of() -> legend_color() - slider_of() -> slider_x(), slider_y() - scrollbar_of() -> scrollbar_x(), scrollbar_y() - transform_of() -> transform_() - theme_of() -> theme_() - title_of() -> title_() - tooltip_of() -> tooltip_() - labels_of() -> labels_() - padding_of() -> padding arg in g2() Also regenerated NAMESPACE and man pages via roxygen2. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: yihui-bot <264330240+yihui-bot@users.noreply.github.com>
Co-authored-by: yihui-bot <264330240+yihui-bot@users.noreply.github.com>
… wrappers, merge main branch, update all docs/tests/examples Agent-Logs-Url: https://github.com/yihui/gglite/sessions/74c49215-645d-42b9-8c58-c1408c38e3e0 Co-authored-by: yihui-bot <264330240+yihui-bot@users.noreply.github.com>
yihui-bot
left a comment
There was a problem hiding this comment.
we should rename the function mark to mark_ and export it
if a function has verb_foo helpers, the main function should be verb_; check if there are inconsistencies in this aspect other than coordinate() (which i've already discovered and mentioned)
| g2(mtcars, x = 'mpg', y = 'hp') |> | ||
| mark_point() |> | ||
| theme_of('classic') | ||
| theme_('classic') |
There was a problem hiding this comment.
since we have helper functions now, please always prefer using helper functions over the original *_() functions, e.g. here you should use theme_classic()
apply this change to all other places
There was a problem hiding this comment.
Done in 7faa5fe. Updated examples/themes.Rmd to use theme_classic(), theme_classicDark(), theme_light(), theme_dark(), theme_academy() instead of theme_('...'). Also updated examples/coordinates.Rmd to use coord_polar(), coord_theta(), etc. instead of coordinate('...').
| #' @param name Base name: `'padding'`, `'margin'`, or `'inset'`. | ||
| #' @param value `NULL`, a scalar, or a length-4 numeric vector. | ||
| #' @return A named list of layout options. | ||
| #' @keywords internal |
There was a problem hiding this comment.
@noRd for internal functions; i don't need their Rd files; with @noRd, there's no need to use @keywords internal any more
if there are other internal functions with roxygen docs, do the same thing
There was a problem hiding this comment.
Done in 7faa5fe. Replaced @keywords internal with @noRd for process_layout, g2_cdn, annotate_df, dropNulls, and build_config. Their .Rd files are now deleted.
There was a problem hiding this comment.
for consistency, i think coordinate should be renamed to coord_
There was a problem hiding this comment.
Done in 7faa5fe. Renamed coordinate() → coord_() and exported it. All coord_*() helpers now call coord_(). Updated examples, tests, and copilot-instructions. R CMD check passes.
…refer helpers in docs Agent-Logs-Url: https://github.com/yihui/gglite/sessions/66d0fe75-a9b6-48e8-94fd-1b793b63b454 Co-authored-by: yihui-bot <264330240+yihui-bot@users.noreply.github.com>
Done in 7faa5fe. Renamed |
yihui-bot
left a comment
There was a problem hiding this comment.
i didn't mean to delete the roxygen docs for @keywords internal objects: the roxygen comments should be kept; it is just that they shouldn't generate the .Rd files (hence we are using @noRd); please restore the roxygen comments
Agent-Logs-Url: https://github.com/yihui/gglite/sessions/e8cabf8c-646f-46e5-a92c-b06e9720fd48 Co-authored-by: yihui-bot <264330240+yihui-bot@users.noreply.github.com>
Restored in a91b0d2. The full roxygen comments (title, description, |
padding_of(), addpadding/margin/insetargs tog2()with scalar/vector support*_of()functions with helper wrappers@keywords internalwith@noRdfor internal functions (keep roxygen docs)coordinate()→coord_()for consistencymark→mark_()and export ittheme_classic(),coord_polar(), etc.@noRdinternal functions (g2_cdn,process_layout,annotate_df,dropNulls,build_config)