only 1 value on map legend
rBatt opened this issue · comments
For the neighborhood maps, if there is only 1 site with significant local autocorrelation, then the color bar only shows a single value, and this value does not match the color of the dot. E.g., SEUS Total Extinction:
It's probably because I do something like
r <- range(values)
bar_vals <- seq(r[1], r[2], length.out=3)
So when there is only one value, there is no from
value in the call to seq
. Could use an if()
to make it ±0.01 around the single value, which should place the single value in the middle of the color bar, where it belongs. Might also check how R does its axes, e.g., via pretty()
.