0

My question is on how to change the colors of the shading on a Kernel Density level plot of fish locations in a lake. The KDE and plot are generated using a set of UTM coordinates included in the HTML document. I am very new to R and totally stuck here so any help would be hugely appreciated!

Data: [file:///C:/Users/k77q645/Desktop/Sample%20UTM.htm][1]

Packages used are: (sp), (rgdal), (GISTools), and (spatstat)

PD<- Pt_Data

PD$X<- PD$utmE_Loss PD$Y<- PD$utmN_Loss

PDsub<-as.data.frame(cbind(PD$X, PD$Y))

names(PDsub)<-c("X","Y")

PD$XY<-PD$X*PD$Y

coordinates(PDsub)<-(~X+Y)

PDsub.dens <- kde.points(PDsub, lims= PDsub, h=500)

level.plot(PDsub.dens)

studyarea<-readOGR(dsn=".", layer="Export_Output")

masker <- poly.outer(PDsub.dens,studyarea,extend=100)

add.masking(masker)

According to the help box it is selecting default colors that show up as pink to red. I would love to have it in shades from blue to yellow to red if possible. Thank you!

  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Be sure to list any packages you are using. For example `kde.points` is not a function in base R. – MrFlick Feb 06 '19 at 19:46
  • Thank you, and will do. – Mike Siemiantkowski Feb 06 '19 at 23:18

0 Answers0