You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\@writefile{toc}{\contentsline {chapter}{\numberline {1}ToOoOlTiPs: An R package for Customizable Tooltips in Interactive Graphics}{1}{section*.1}\protected@file@percent }
\newlabel{fig:penguins-alison}{{1}{2}{Artwork by \@allison\_horst}{figure.caption.2}{}}
29
+
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces A basic non-interactive plot made with the ggplot2 package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. Visit the online article to access the interactive version made with the plotly package.}}{2}{figure.caption.4}\protected@file@percent }
30
+
\newlabel{fig:penguins-ggplot}{{2}{2}{A basic non-interactive plot made with the ggplot2 package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. Visit the online article to access the interactive version made with the plotly package}{figure.caption.4}{}}
31
+
\bibcite{crosstalk}{{1}{2021}{{Cheng and Sievert}}{{}}}
32
+
\bibcite{palmerpenguins}{{2}{2020}{{Horst et~al.}}{{Horst, Hill, and Gorman}}}
33
+
\bibcite{plotly}{{3}{2020}{{Sievert}}{{}}}
34
+
\bibcite{RJ-2021-050}{{4}{2021}{{Wang and Cook}}{{}}}
## ----penguins-alison, out.width = "100%", out.height = "30%", fig.cap = "Artwork by \\@allison\\_horst", fig.alt="A picture of three different penguins with their species: Chinstrap, Gentoo, and Adelie. "----
## ----penguins-plotly, echo = TRUE, fig.height = 5, fig.cap="A basic interactive plot made with the plotly package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. When hovering on a point, a tooltip will show the exact value of the bill depth and length for that point, along with the species name.", include=knitr::is_html_output(), eval=knitr::is_html_output()----
25
-
#> p <- penguins %>%
26
-
#> ggplot(aes(x = bill_depth_mm, y = bill_length_mm,
27
-
#> color = species)) +
28
-
#> geom_point()
29
-
#> ggplotly(p)
24
+
## ----penguins-plotly, echo = TRUE, out.width="100%", fig.width = 6, fig.height=5, layout="l-body", fig.cap="A basic interactive plot made with the plotly package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. When hovering on a point, a tooltip will show the exact value of the bill depth and length for that point, along with the species name.", include=knitr::is_html_output(), eval=knitr::is_html_output()----
25
+
# p <- penguins %>%
26
+
# ggplot(aes(x = bill_depth_mm, y = bill_length_mm,
27
+
# color = species)) +
28
+
# geom_point()
29
+
# ggplotly(p)
30
30
31
31
32
-
## ----penguins-ggplot, echo = TRUE, fig.height = 5, fig.cap="A basic non-interactive plot made with the ggplot2 package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. Visit the online article to access the interactive version made with the plotly package.", include=knitr::is_latex_output(), eval=knitr::is_latex_output()----
32
+
## ----penguins-ggplot, echo = TRUE, out.width="100%", fig.width = 6, fig.height=5, fig.cap="A basic non-interactive plot made with the ggplot2 package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. Visit the online article to access the interactive version made with the plotly package.", include=knitr::is_latex_output(), eval=knitr::is_latex_output()----
Copy file name to clipboardexpand all lines: inst/paper-with-errors/paper-with-errors.Rmd
+6-5
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
2
title: "ToOoOlTiPs: An R package for Customizable Tooltips in Interactive Graphics"
3
+
date: "2022-11-09"
3
4
abstract: >
4
5
An abstract of less than 150 words.
5
6
draft: true
@@ -53,8 +54,8 @@ Some packages on interactive graphics include \CRANpkg{plotly} [@plotly] that in
53
54
54
55
The \CRANpkg{palmerpenguins} data [@palmerpenguins] features three penguin species which has a lovely illustration by Alison Horst in Figure \@ref(fig:penguins-alison).
```{r penguins-alison, out.width = "100%", out.height = "30%", fig.cap = "Artwork by \\@allison\\_horst", fig.alt="A picture of three different penguins with their species: Chinstrap, Gentoo, and Adelie. "}
58
+
knitr::include_graphics("figures/penguins.png")
58
59
```
59
60
60
61
Table `r knitr::asis_output(ifelse(knitr::is_html_output(), '\\@ref(tab:penguins-tab-interactive)', '\\@ref(tab:penguins-tab-static)'))` prints at the first five rows of the `penguins` data:
@@ -68,17 +69,17 @@ knitr::kable(head(penguins), format = "latex", caption = "A basic table") %>%
68
69
kableExtra::kable_styling(font_size = 7)
69
70
```
70
71
71
-
Figure `r knitr::asis_output(ifelse(knitr::is_html_output(), '\\@ref(fig:penguins-plotly)', '\\@ref(fig:penguins-ggplot)'))` shows an`r ifelse(knitr::is_html_output(), 'interactive', '')` plot of the penguins data, made using the `r knitr::asis_output(ifelse(knitr::is_html_output(), '\\CRANpkg{plotly}', '\\CRANpkg{ggplot2}'))` package.
72
+
Figure `r knitr::asis_output(ifelse(knitr::is_html_output(), '\\@ref(fig:penguins-plotly)', '\\@ref(fig:penguins-ggplot)'))` shows a`r ifelse(knitr::is_html_output(), 'interactive', '')` plot of the penguins data, made using the `r knitr::asis_output(ifelse(knitr::is_html_output(), '\\CRANpkg{plotly}', '\\CRANpkg{ggplot2}'))` package.
72
73
73
-
```{r penguins-plotly, echo = TRUE, fig.height = 5, fig.cap="A basic interactive plot made with the plotly package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. When hovering on a point, a tooltip will show the exact value of the bill depth and length for that point, along with the species name.", include=knitr::is_html_output(), eval=knitr::is_html_output()}
74
+
```{r penguins-plotly, echo = TRUE, out.width="100%", fig.width = 6, fig.height=5, layout="l-body", fig.cap="A basic interactive plot made with the plotly package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. When hovering on a point, a tooltip will show the exact value of the bill depth and length for that point, along with the species name.", include=knitr::is_html_output(), eval=knitr::is_html_output()}
74
75
p <- penguins %>%
75
76
ggplot(aes(x = bill_depth_mm, y = bill_length_mm,
76
77
color = species)) +
77
78
geom_point()
78
79
ggplotly(p)
79
80
```
80
81
81
-
```{r penguins-ggplot, echo = TRUE, fig.height = 5, fig.cap="A basic non-interactive plot made with the ggplot2 package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. Visit the online article to access the interactive version made with the plotly package.", include=knitr::is_latex_output(), eval=knitr::is_latex_output()}
82
+
```{r penguins-ggplot, echo = TRUE, out.width="100%", fig.width = 6, fig.height=5, fig.cap="A basic non-interactive plot made with the ggplot2 package on palmer penguin data. Three species of penguins are plotted with bill depth on the x-axis and bill length on the y-axis. Visit the online article to access the interactive version made with the plotly package.", include=knitr::is_latex_output(), eval=knitr::is_latex_output()}
0 commit comments