Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Rich Shepard
On Tue, 27 Nov 2007, Anthony Floyd wrote: > Check the class library documentation for the axes() object. > http://matplotlib.sourceforge.net/matplotlib.axes.html Anthony, I've looked at this but didn't absorb it all. Now I'll spend more time with it. > Your best bet is really to explore the

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Rich Shepard
On Tue, 27 Nov 2007, Eric Firing wrote: > Or just keep track of the axes object when it is created. In > embedding_in_wx.py: > >def plot_data(self): ># Use ths line if using a toolbar >a = self.fig.add_subplot(111) > > "a" is the axes instance. Eric, Thanks. I had not pic

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Rich Shepard
On Tue, 27 Nov 2007, Michael Droettboom wrote: > You can get the axes through the Figure instance. (I don't know how you have > your embedding set up, but if it's something like embedding_in_wx.py, there's > the line "self.fig = Figure((9, 8), 75)", so self.fig is a Figure instance). Thanks

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Anthony Floyd
>Ah, now I see the syntax for using axes(). However, if I'm embedding the > plots in a wxPython panel, I'm not using pylab. In this environment I also > haven't yet figured out how to add axis labels or specify the range of each > axis. Within pylab on stand-alone test apps it works fine. Chec

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Eric Firing
Michael Droettboom wrote: > > You can get the axes through the Figure instance. (I don't know how you > have your embedding set up, but if it's something like > embedding_in_wx.py, there's the line "self.fig = Figure((9, 8), 75)", so > self.fig is a Figure instance). > >self.fig.gca() #

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Michael Droettboom
Rich Shepard wrote: > On Tue, 27 Nov 2007, Michael Droettboom wrote: > >> Yes. You can do >> >> from pylab import * >> ... >> axes().grid(True) # For both axes >> axes().xaxis.grid(True) # Just x >> axes().yaxis.grid(True) # Just y >> >> Rather than just an on/off boolean

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Rich Shepard
On Tue, 27 Nov 2007, Michael Droettboom wrote: > Yes. You can do > > from pylab import * > ... > axes().grid(True) # For both axes > axes().xaxis.grid(True) # Just x > axes().yaxis.grid(True) # Just y > > Rather than just an on/off boolean, you can also provide line

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Michael Droettboom
Yes. You can do from pylab import * ... axes().grid(True) # For both axes axes().xaxis.grid(True) # Just x axes().yaxis.grid(True) # Just y Rather than just an on/off boolean, you can also provide line styles: axes().grid(color='r', linestyle='-',