Handle empty/missing data in scatter plot

Currently, only one case is handled correctly.