adding option to show the color legend