Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

legend key examples #6049

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion R/geom-path.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
#' @examples
#' # geom_line() is suitable for time series
#' ggplot(economics, aes(date, unemploy)) + geom_line()
#' # separate by colour and use "timeseries" legend key glyph
#' ggplot(economics_long, aes(date, value01, colour = variable)) +
#' geom_line()
#' geom_line(key_glyph = "timeseries")
#'
#' # You can get a timeseries that run vertically by setting the orientation
#' ggplot(economics, aes(unemploy, date)) + geom_line(orientation = "y")
Expand Down
5 changes: 3 additions & 2 deletions R/geom-text.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@
#' scale_colour_discrete(l = 40)
#' p + geom_label(aes(fill = factor(cyl)), colour = "white", fontface = "bold")
#'
#' p + geom_text(aes(size = wt))
#' # Scale size of text, and change legend key glyph from a to point
#' p + geom_text(aes(size = wt), key_glyph = "point")
#' # Scale height of text, rather than sqrt(height)
#' p +
#' geom_text(aes(size = wt)) +
#' geom_text(aes(size = wt), key_glyph = "point") +
#' scale_radius(range = c(3,6))
#'
#' # You can display expressions by setting parse = TRUE. The
Expand Down
3 changes: 2 additions & 1 deletion man/geom_path.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions man/geom_text.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/labeller.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading