# heatcircle with categorical variables only
library(ggplot2)
data <- data.frame(x = rep(c("a", "b", "c"), 3),
y = rep(c("d", "e", "f"), 3),
outside_values = rep(c(1,5,7),3),
inside_values = rep(c(2,3,4),3))
ggplot(data, aes(x,y)) +
geom_heat_circle(outside = outside_values,
inside = inside_values)
# Making the inside smaller by setting r to be larger.
ggplot(data, aes(x,y)) +
geom_heat_circle(outside = outside_values,
inside = inside_values,
r = 5)
# heatcircle with numeric variables only
data <- data.frame(x = rep(c(1, 2, 3), 3),
y = rep(c(1, 2, 3), 3),
outside_values = rep(c(1,5,7),3),
inside_values = rep(c(2,3,4),3))
ggplot(data, aes(x,y)) +
geom_heat_circle(outside = outside_values,
inside = inside_values)
# heatcircle with a mixture of numeric and categorical variables
data <- data.frame(x = rep(c("a", "b", "c"), 3),
y = rep(c(1, 2, 3), 3),
outside_values = rep(c(1,5,7),3),
inside_values = rep(c(2,3,4),3))
ggplot(data, aes(x,y)) +
geom_heat_circle(outside = outside_values,
inside = inside_values)
Run the code above in your browser using DataLab