On Thu, 2008-10-23 at 13:34 +0000, Thomas Guettler wrote: > Hi, > > I use the API of matplotlib and have a basic problem: > > Up to now I am used to gather my data into a list of tuples. But > matplotlib uses serveral lists instead. > > Example: > me: [(date1, count1), (date2, count2), ...] > matplotlib: ax.plot_date(dates, counts) > > Finally I use something like this quite often: > method([item[0] for item in items], [item[1] for item in items]) > But I think thats to much looping.
x=[(date1, count1), (date2, count2), ...] dates,counts=zip(*x) ax.plot_date(dates, counts) > That's my personal problem, but I think a more pythonic > API would be nice... afaik its nothing to do with the matplotlib api: better to ask this on the python channel where it features regularly > Thomas > > -- > Thomas Guettler, http://www.thomas-guettler.de/ > E-Mail: guettli (*) thomas-guettler + de -- "When you think of the long and gloomy history of man, you will find far more hideous crimes have been committed in the name of obedience than have been committed in the name of rebellion". C.P.Snow, "Either-Or" (1961)
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users