graph with legend