The updated function is a useful fix for datasets where some color and symbol combinations are missing. I also like that the symbol entries are added separately, since that keeps the legend much easier to read without changing the actual plotted data.