plotting with legend