library(ggplot2)
positions <- data.frame(
id = rep("glass", each = 4),
x = c(3.5,4.5,3,5),
y = c(1,1,5,5),
fill = rep("a")
)
positions
ggplot(positions[c(1,2,4,3),], aes(x = x, y = y)) +
geom_polygon(aes(fill=fill,group = id))+
theme_classic()+
theme(legend.position="non")+
labs(x=NULL,y=NULL)+
scale_fill_brewer(palette="Blues")
网友评论