fixed error when setting legend on scatter

only try and draw / hide legends when there are legends