C M wrote: [...] > So basically I need to use plot_date but in a figure embedded in a > wxPython app. > Still not sure how this should be written. To make it simple, this > plot() command > works in my app already: > > x = [1,2,3] > y = [10,20,30] > self.subplot.plot(x, y)
I don't understand--where did "self" come from? If we assume that self.subplot is in fact an axes instance, then you can use self.subplot.plot_date(...), where the arguments would be the same as if you were using pylab.plot_date(...). All this might be clarified if you look at the code for pylab.plot and pylab.plot_date. I may be missing something; I was not paying attention to earlier parts of this thread, I haven't done much with dates and have never used plot_date myself, and I have no experience with embedding. Maybe it would also help for you to look at dates.py (one of the mpl modules)? Eric > > So, my question is, how would this be modified for a wx app (that is, no > pylab > allowed) and use plot_date()? Assume my dates are as given below. > > dates (x axis): > 09-01-07 12:00:02 > 09-02-07 12:00:04 > 09-03-07 12:00:06 > > values (y axis): > 10 > 20 > 30 > > The examples that Bill and Mark gave above in the list showed how to do > this using pylab, but I just need the simplest example and one which does > not use pylab. > > Thanks, > Che > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users