-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Iris plots, code and typo correction on README.md.
- Loading branch information
1 parent
db7f3d8
commit b9b560a
Showing
4 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
library(tidyverse) | ||
library(patchwork) | ||
library(ggforce) | ||
|
||
data(iris) | ||
theme_set(theme_ligth()) | ||
descrp <- "The smallest specie among virginica and versicolor" | ||
|
||
|
||
p <- | ||
ggplot(iris, | ||
aes(x = Petal.Width, y = Petal.Length)) + | ||
geom_point() + | ||
geom_mark_ellipse(show.legend = FALSE, | ||
aes(fill = Species, | ||
filter = Species == "setosa", | ||
label = "Iris setosa", | ||
description = descrp)) + | ||
labs(title = "Iris on default Windows PNG engine", | ||
x = "Petal width (cm)", y = "Petal length (cm)") | ||
|
||
ggsave(filename = "images/iris_default.png", plot = p, | ||
height = 5, width = 7, units = "in", dpi = 500) | ||
|
||
|
||
q <- p + labs(title = "Now with Cairo's PNG engine") | ||
|
||
ggsave(filename = "images/iris_cairo.png", plot = q, | ||
height = 5, width = 7, units = "in", dpi = 500, type = "cairo") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.