prevent NPE
fix Javadoc and remove compiler warning
fix logic when deciding to plot or not lines based on the
ScanPlotSettings

There seems to be some duplication here which should be resolved, but
not on a branch.