Add legend for graphs