fixed 'reference before assignment' error 

'reference before assignment' error when legend is in standard
(upper right) position. Fixed by setting 'position' and 'anchor' to
'None' if 'legend._loc==1'
Merge pull request #22 from mschluet/master

error in _draw_legend