Hello,
I've the following code:
def makeLinePlot(self, graph):
fig = Figure()
p = fig.add_subplot(111)
for label, line in graph.sourceReader:
p.plot(line, label=label)
print len(line)
p.legend(loc=0)
p.xaxis.set_ticklabels(graph.sourceReader.headers)
print graph.sourceReader.headers
print len(graph.sourceReader.headers)
canvas = FigureCanvas(fig)
canvas.print_figure(graph.name, dpi=graph.dpi)
On the console this generated this output:
15
15
15
15
15
15
15
15
15
15
15
['Jan 04', 'Feb 04', 'Mar 04', 'Apr 04', 'May 04', 'Jun 04', 'Jul 04', 'Aug
04', 'Sep 04', 'Oct 04', 'Nov 04', 'Dec 04', 'Jan 04', 'Feb 05', 'Mar 05']
15
So all data lists and the ticklabels lists are of equal length.
But the generated graph only shows the first 8 elements of the tick labels
(from "Jan 04" to "Aug 04"). The data is completely shown. Only ticklabels
are missing.
What is wrong there?
Thanks,
Florian