Think about a timeseries of celsius temperatures of a dataset defining nodata = -9999. When plotting the result as a jpg, the graph may contain some negative peaks at -9999 when hitting a nodata pixel, ruining the chart. Make sure that nodata values are excluded from the results.