Fix bug on legends of scatter