[R-sig-Geo] creating a data range for color coding and using it in color_manual_scale
PAMELLA KAGELIZA KILAVI
pk@ge||z@ @end|ng |rom @tudent@@uonb|@@c@ke
Mon Mar 16 12:55:45 CET 2020
Dear All.
Kindly assist me with the proper code for the following. I have converted
the dose to factor and grouped it into 5 levels. I need to assign a color
code to each of the levels and use is for spatial mapping. Thank you
ggplot(Mrima, mapping=aes(x=lon,y=lat))+
geom_point(data=Mrima, aes(colour=factor(dose),
cut(dose,br=c(0,60,120,360,600,5144)))) +
scale_color_manual(my_col, values = c("#D01556#", "#DF785B","EFDC60",
"#B5D374","#7CCA89"),breaks=waiver(), aesthetics =c("colour","fill"))
This is the error I am getting
Error: Insufficient values in manual scale. 1806 needed but only 5 provided.
--
The University of Nairobi is ISO 9001:2015 certified.
Website:
http://www.uonbi.ac.ke/ <http://www.uonbi.ac.ke/>
Facebook:
https://www.facebook.com/uonbi.ac.ke <https://www.facebook.com/uonbi.ac.ke>
Twitter: @uonbi https://twitter.com/uonb <https://twitter.com/uonb>
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list