USGS-R / gsplot

plotting foundation for timeseries reporting
Other
6 stars 14 forks source link

Throw error for NULL labels passed to callouts #440

Open thongsav-usgs opened 7 years ago

thongsav-usgs commented 7 years ago

gsplot() %>% callouts(NA, NA, labels=NULL) produces the error:

Error in text.default(x = numeric(0), y = numeric(0), labels = NULL, pos = c(1,  : 
  no coordinates were supplied

I believe it's caused by labels being null, but a more explicit error message helping the caller identify the issue would be useful.