Not all ticklabels and data are printed

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?

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.

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.

···

Thanks,

    > Florian

    > -------------------------------------------------------
    > This SF.Net email is sponsored by Oracle Space
    > Sweepstakes Want to be the first software developer in
    > space? Enter now for the Oracle Space Sweepstakes!
    > http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
    > _______________________________________________
    > Matplotlib-users mailing list
    > Matplotlib-users@lists.sourceforge.net
    > https://lists.sourceforge.net/lists/listinfo/matplotlib-users

    > 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?

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
each other. When I could change the angle to 45° for example there would be
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
functions which treat them specifically as dates.

Thanks,

Florian

···

Am Montag, 16. Mai 2005 18:57 schrieb John Hunter:

Date ticking was a hassle for me to get used to, but I think the
examples John pasted below and this will get you through:

http://matplotlib.sourceforge.net/screenshots/finance_work2.py

Travis

···

On Mon, 16 May 2005 11:57:49 -0500, "John Hunter" <jdhunter@...4...> said:

    > 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?

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.

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.

    > Thanks,

    > Florian

    > -------------------------------------------------------
    > This SF.Net email is sponsored by Oracle Space
    > Sweepstakes Want to be the first software developer in
    > space? Enter now for the Oracle Space Sweepstakes!
    > http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
    > _______________________________________________
    > Matplotlib-users mailing list
    > Matplotlib-users@lists.sourceforge.net
    >
    https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
  Travis Brady
  tdbrady@...146...