Skip to content

Commit 55ea4ee

Browse files
author
julianstanley
committed
Replace iris examples with palmerpenguins
1 parent 9bc585a commit 55ea4ee

File tree

7 files changed

+27
-22
lines changed

7 files changed

+27
-22
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ Suggests:
7474
processx,
7575
plotlyGeoAssets,
7676
forcats,
77-
thematic
77+
thematic,
78+
palmerpenguins
7879
LazyData: true
7980
RoxygenNote: 7.1.1
8081
Encoding: UTF-8

R/ggplotly.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
#' @seealso [plot_ly()]
3737
#' @examples \dontrun{
3838
#' # simple example
39-
#' ggiris <- qplot(Petal.Width, Sepal.Length, data = iris, color = Species)
40-
#' ggplotly(ggiris)
39+
#' ggpenguins <- qplot(bill_length_mm , body_mass_g,
40+
#' data = palmerpenguins::penguins, color = species)
41+
#' ggplotly(ggpenguins)
4142
#'
4243
#' data(canada.cities, package = "maps")
4344
#' viz <- ggplot(canada.cities, aes(long, lat)) +
@@ -58,7 +59,8 @@
5859
#' demo("crosstalk-highlight-ggplotly", package = "plotly")
5960
#'
6061
#' # client-side linked brushing in a scatterplot matrix
61-
#' highlight_key(iris) %>%
62+
#' highlight_key(palmerpenguins::penguins) %>%
63+
#' highlight_key(palmerpenguins::penguins) %>%
6264
#' GGally::ggpairs(aes(colour = Species), columns = 1:4) %>%
6365
#' ggplotly(tooltip = c("x", "y", "colour")) %>%
6466
#' highlight("plotly_selected")

R/plotly.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@
118118
#' # You might notice plot_ly() has named arguments that aren't in this figure
119119
#' # reference. These arguments make it easier to map abstract data values to
120120
#' # visual attributes.
121-
#' p <- plot_ly(iris, x = ~Sepal.Width, y = ~Sepal.Length)
122-
#' add_markers(p, color = ~Petal.Length, size = ~Petal.Length)
123-
#' add_markers(p, color = ~Species)
124-
#' add_markers(p, color = ~Species, colors = "Set1")
125-
#' add_markers(p, symbol = ~Species)
126-
#' add_paths(p, linetype = ~Species)
121+
#' p <- plot_ly(palmerpenguins::penguins, x = ~bill_length_mm, y = ~body_mass_g)
122+
#' add_markers(p, color = ~bill_depth_mm, size = ~bill_depth_mm)
123+
#' add_markers(p, color = ~species)
124+
#' add_markers(p, color = ~species, colors = "Set1")
125+
#' add_markers(p, symbol = ~species)
126+
#' add_paths(p, linetype = ~species)
127127
#'
128128
#' }
129129
#'

man/api.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ggplotly.Rd

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_ly.Rd

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/reexports.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)