The code below works fine on my Mac but it will not run on my PC, as I continue to get the error message below the code. Any suggestions? Thanks!!
ggplot(data=sp, aes(x=elevm, y=dist)) +
geom_point(aes(x=elevm, y=dist)) +
theme(legend.position="top") +
geom_hdr_rug(aes(x = elevm), na.rm=TRUE, prob = c(0.99, 0.50, 0.25), fill = "blue")+
geom_point(na.rm=TRUE, aes(colour = hdr_bin(x=elevm, y=dist))) +
scale_colour_viridis_d(direction = -1)
Error in alpha(fill_shade, data$alpha) : Data must either be a data frame or a matrix