-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSobrevivencia.R
More file actions
41 lines (30 loc) · 1.28 KB
/
Sobrevivencia.R
File metadata and controls
41 lines (30 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#Gráfico Pizza 3D Sobrevivência
#Sobrevivência total
Observacao <- c("Abelhas vivas", "Abelhas mortas")
numeros <- c(50.59, 48.24)
pie(numeros, labels = Observacao, main = "Sobrevivência total de abelhas")
library(ggplot2)
df <- data.frame(Observacao, numeros)
ggplot(df, aes(x = "", y = numeros, fill = Observacao)) +
geom_bar(width = 1, stat = "identity") +
coord_polar("y", start = 0) +
labs(title = "Proporção total de abelhas vivas e mortas")+
theme_void()
#Sobrevivência durante período chuvoso
Observacao1 <- c("Abelhas vivas", "Abelhas mortas")
numeros1 <- c(58.33, 38.89)
df1 <- data.frame(Observacao1, numeros1)
ggplot(df, aes(x = "", y = numeros1, fill = Observacao1)) +
geom_bar(width = 1, stat = "identity") +
coord_polar("y", start = 0) +
labs(title = "Proporção total de abelhas vivas e mortas durante temporada chuvosa")+
theme_void()
#Sobrevivência durante período seco
Observacao2 <- c("Abelhas vivas", "Abelhas mortas")
numeros2 <- c(44.90, 55.10)
df2 <- data.frame(Observacao2, numeros2)
ggplot(df, aes(x = "", y = numeros2, fill = Observacao2)) +
geom_bar(width = 1, stat = "identity") +
coord_polar("y", start = 0) +
labs(title = "Proporção total de abelhas vivas e mortas durante temporada seca")+
theme_void()