added docstring for addParamsToLegend()