|
From: Florian L. <mai...@xg...> - 2005-05-16 17:20:09
|
Am Montag, 16. Mai 2005 18:57 schrieb John Hunter: > >>>>> "Florian" =3D=3D Florian Lindner <mai...@xg...> writes: > > Florian> So all data lists and the ticklabels lists are of equal > Florian> length. > > Florian> But the generated graph only shows the first 8 elements > Florian> of the tick labels (from "Jan 04" to "Aug 04"). The data > Florian> is completely shown. Only ticklabels are missing. > > Florian> What is wrong there? > > It is not important that the datalists and tick labels are equal > length. What matters is for the tick locations and tick labels to be > equal length. You also need to call ax.set_xticks in addition to > ax.set_xticklabels. Ok, I've added: p.set_xticks(range(len(graph.sourceReader.headers))) Is it possible to change the angle of ticks? Right now they are overwriting= =20 each other. When I could change the angle to 45=B0 for example there would = be=20 enough space. > > But since you are working with dates, I think you'll have better luck > setting a custom tick locator and formatter, as described in > http:/matplotlib.sf.net/matplotlib.ticker.html, > http:/matplotlib.sf.net/matplotlib.dates.html, and > http:/matplotlib.sf.net/examples/date_demo1.py, > http:/matplotlib.sf.net/examples/date_demo2.py and chapter 5 the users > guide. Since I don't know in which format the input data will be I can't use=20 functions which treat them specifically as dates. Thanks, =46lorian |