made location of legend adjustable