Legend improvements, fix regression in plotting examples