fixed plot2D/addLegend