We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
The documentation for lidR::plot says that the breaks argument can be
lidR::plot
breaks
either a numeric vector with the actual breaks, or a name of a method accepted by the style argument of classIntervals
classIntervals
But when I try to supply my own breaks, an error is returned. To reproduce:
library(lidR) LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR") las <- readLAS(LASfile) plot(las, axis=TRUE, legend=TRUE, breaks=seq(0, 40, by=2)) #> Error in classInt::classIntervals(colorattr, min(nbreaks, nunique), breaks) : #> 0 unknown
Looking at the relevant function in classInt, it seems that one can specify the style as "fixed" and then pass the breaks as a separate argument:
classInt
"fixed"
mybreaks <- seq(0, 40, by=2) classInt::classIntervals(las$Z, length(mybreaks), style="fixed", fixedBreaks=mybreaks) #> style: fixed #> [0,2) [2,4) [4,6) [6,8) [8,10) [10,12) [12,14) [14,16) [16,18) [18,20) [20,22) [22,24) #> 9446 633 769 1087 1570 2164 3025 4052 4104 3847 3482 2098 #> [24,26) [26,28) [28,30) [30,32) [32,34) [34,36) [36,38) [38,40] #> 1004 265 70 39 2 0 0 0
Unless I'm missing something, this should be fixable with a small change in plot.
plot
The text was updated successfully, but these errors were encountered:
0a90c92
Fixed, thank you for reporting
Sorry, something went wrong.
Jean-Romain
No branches or pull requests
Hello,
The documentation for
lidR::plot
says that thebreaks
argument can beBut when I try to supply my own breaks, an error is returned. To reproduce:
Looking at the relevant function in
classInt
, it seems that one can specify the style as"fixed"
and then pass the breaks as a separate argument:Unless I'm missing something, this should be fixable with a small change in
plot
.The text was updated successfully, but these errors were encountered: