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
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
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
>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
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() #
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
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
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='-',