library(ggplot2)
data(pbmc)
frame <- as.data.frame(pbmc$umap)
frame$type <- pbmc$types
ggplot(frame, aes(x=xs, y=ys, color=type)) +
geom_point(size=0.75) +
scale_color_chameleon() +
theme(legend.text=element_text(size=12), legend.key.height=unit(14, 'pt'))
Run the code above in your browser using DataLab