BUG: legend behaves inconsistently when plotting to the same axes repeatedly
Merge pull request #6678 from sinhrks/legend_pr

BUG: legend behaves inconsistently when plotting to the same axes