C M wrote: > > > > x = [1,2,3] > > y = [10,20,30] > > self.subplot.plot(x, y) > > I don't understand--where did "self" come from? > > > Sorry--"self" here refers to an instance of a wxPanel class in my > wxPython app. > It is the parent window for the mpl subplot which is meant to be a child > of it. > The subplot is itself a child of a Figure, so the creation is like this: > > self.figure = Figure(None, dpi) > self.subplot = self.figure.add_subplot(111)
add_subplot makes an Axes instance and puts it in the Figure instance; self.subplot is this Axes instance, as I had guessed. So, you can apply any Axes method to it. Eric ------------------------------------------------------------------------- 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