figure legend only printing first letter
legend, matplotlib, python
Solution
I haven't figured out whether it is a bug or intentional (for some reason) in matplotlib, but in order to get a full legend label you need to leave a trailing comma on your list of labels:
figlegend((k),('Limit',),loc='lower center')
change that line and your code:
from pylab import *
k = plot((0, 1),(1, 1))
figlegend((k),('Limit',),loc='lower center')
savefig('test.pdf')
produces the figure:
Alternatively, one can use `[]` to achieve the same result:
figlegend((k),(['Limit']),loc='lower center')
Problem
I try to print a figlegend with only one line, but I only get the first letter. I have the following script for making the plot: ``` from pylab import * k = plot((0, 1),(1, 1)) figlegend((k),('Limit'),loc='lower center') savefig('test.pdf') ``` The output is: What am I doing wrong? (Or is it a bug?)