Fix bug in addCustomCode (after argument is not assigned)
Deal with the case where a Matlab colormap has only 1 colour (as this is not allowed in pgfplots)