Skip to content

Commit a1ccec7

Browse files
Update README.md
1 parent 90f0a51 commit a1ccec7

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,21 @@ devtools::install_github("terrytangyuan/autoplotly")
2828
p <- autoplotly(prcomp(iris[c(1, 2, 3, 4)]), data = iris,
2929
colour = 'Species', label = TRUE, label.size = 3, frame = TRUE)
3030

31-
# You can apply additional ggplot2 elements to interactive plot built using `autoplotly()`
32-
p <- p +
31+
# You can apply additional ggplot2 elements to the generated interactive plot
32+
p +
3333
ggplot2::ggtitle("Principal Components Analysis") +
3434
ggplot2::labs(y = "Second Principal Components", x = "First Principal Components")
35-
p
35+
36+
# Or apply additional plotly elements to the generated interactive plot
37+
p %>% plotly::layout(annotations = list(
38+
text = "Example Text",
39+
font = list(
40+
family = "Courier New, monospace",
41+
size = 18,
42+
color = "black"),
43+
x = 0,
44+
y = 0,
45+
showarrow = TRUE))
3646
```
3747

3848
You can `autoplotly` many other statistical results automatically with the help of [ggfortify](https://github.com/sinhrks/ggfortify). A complete list can be found [here](https://github.com/sinhrks/ggfortify#coverage).

0 commit comments

Comments
 (0)