It is hard to say what the problem is without knowing more about your data. Does band2 have any non-NA values? What are the results of
str(band2)
summary(band2)
I can approximately reproduce your error by trying to plot a data frame where one column is all NA.
> DF <- data.frame(A = 1:4, B = c(NA, NA, NA, NA))
> plot(DF)
Error in plot.window(...) : need finite 'ylim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf