correct examples for legend and opts.type