This is all well and good if the SPDFs and Rasters are holding actual AOD values, but what about when you plot "trend" SPDFs and Rasters? The data they hold are not AOD values, but the differences in AOD values. Therefore, trend data structures should name their variable "aodTrend" instead of "AOD", which means the plotting functions can't use a hardcoded variable name. How should they be changed?
Plotting functions check for the presence of "AOD" or "aodTrend" variables in the SPDF/raster. Whichever is present will be used for color/fill and legend title. Throw an error if the spdf/raster has both variables or neither (which will probably never happen), or allow the user to specify which to use with an additional varName parameter.
Plotting functions will plot the first variable stored in the SPDF/raster. A warning will be issued if the SPDF/raster has more than one variable. Legend title defaults to the variable name.
The
goesaodc_plotScanPoints()
function colors points using an SPDF's "AOD" variable:The
goesaodc_plotScanRaster()
function fills cells using a raster's "AOD" variable:This is all well and good if the SPDFs and Rasters are holding actual AOD values, but what about when you plot "trend" SPDFs and Rasters? The data they hold are not AOD values, but the differences in AOD values. Therefore, trend data structures should name their variable "aodTrend" instead of "AOD", which means the plotting functions can't use a hardcoded variable name. How should they be changed?
varName
parameter.I'm leaning towards the 2nd option.