Why am I having issues plotting LAS with grDevices::terrain.colors()?

43 views Asked by At

I'm trying to share a script amongst my colleagues, it involves creating a few small point cloud plots using lidR package. On my personal machine, I'm not having any issues, but my colleagues are all having issues and so is my remote desktop.

The plotting code essentially looks like this:

lidR::plot(las,size=5,pal=grDevices::terrain.colors(30),axis=TRUE)

The error everyone is getting (which I also receive, but on my computer, it displays the plots and shows this only as a warning):

Error in is.character(pal) && pal == "auto" : 'length = 30' in coercion to 'logical(1)'

I would like to manually select the colours displayed in the RGL window. How can I overcome this issue?

I've tried working with RColorBrewer along with manually inputting the colours, but I kept getting this error.

1

There are 1 answers

0
JRR On

Use lidR::plot(las,size=5,pal=grDevices::terrain.colors, axis=TRUE)