Original report at SourceForge, opened Thu Jan 13 07:05:53 2011
Reducing the font size results in an incorrect line style being shown in the legend. Take this code snippet
import matplotlib matplotlib.rcParams['font.size']=5 from pylab import * plot([1,2,3,4], '--', label='A') legend() show()
Please see the annotated output of this code.
It is not that the line style is actually wrong, but it looks wrong because the handlelength is too short. You need to explicitly increase the handlelength.
plt.legend(handlelength=5)
Activity
leejjoon commented on Jul 21, 2011
It is not that the line style is actually wrong, but it looks wrong because the handlelength is too short.
You need to explicitly increase the handlelength.