I cannot get the legend to display the cut points I want correctly. Instead of doing the colors at 1, 2, 3, 4, 5 - its doing the color breaks at odd points on the legends. The labels seem to get coded correctly however.
# Code Below #----------------------------------------------------------------------------------------. # Messing around with Student Engagement Survey data library(RgoogleMaps) library(PBSmapping) library(maptools) library(reshape) library(RColorBrewer) library(plotGoogleMaps) library(rgdal) rm(list=ls()) mydata <- data.frame(NAME=c("James Elem","Chloe MS","Logan HS", "Kristen Elem", "Heather HS", "Nora MS", "Elizabeth JH"), i1.a.=c(0,1,2, 2.4, 3.5, 4.3, 5), lat = c(32.968, 32.874, 32.884, 32.91538, 32.91810, 32.87884, 32.94468), lon = c(-96.692, -96.725, -96.708, -96.72321, -96.71760, -96.73990, -96.72850) ) # ------------------------------- # # --------------------------------------- # # -- Ploting School Locations ----------- # coordinates(mydata) <- ~lon + lat proj4string(mydata) <- CRS("+proj=longlat +datum=WGS84") #SchoolRaceP <- SpatialPointsDataFrame, data # Playing around with various options m <- plotGoogleMaps(mydata, zcol="i1.a.", at=0:4, colPalette = c("#FF0000","#FF9900","#FFFF00","#0066FF","#00CC00"), layerName="Some Schools", filename="MyMap.html") [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list 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.