Is there a way to get ggplot scale_colour_distiller to display all values in 
the legend? 

Currently using this code.

thanks!

mike

library(ggplot2)
#Input data: insert the filename for raw data
data <- 
read.csv("http://www.lecturematerials.co.uk/data/learning_bands.csv",header=T)

ggplot(data,aes(x=multiplier,y=factor)) +
  geom_point(aes(colour=band), size=8, shape=15) +
  scale_colour_distiller(palette = "Spectral", direction=-1, guide="legend", 
name="Order") +
  ggtitle("Times Tables Learning Bands") +
  scale_x_continuous(name="Multiplier", limits=c(2, 12), 
breaks=c(2,4,6,8,10,12)) +
  scale_y_continuous(name="Factor", limits=c(2, 12), breaks=c(2,4,6,8,10,12)) + 
  geom_abline(intercept = 0, slope = 1, size=1) +
  coord_fixed() 




---
Mike Smith

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to