Jeremy, how can I set axes limits on a figure embedded in
> WX? I am plotting with
> a = self.figmgr.add_subplot(111) a.plot(x,y)
> just like in your example.
> I would like to do someting like:
> axis([0,10,0,10])
There is no axis command in the OO interface (though is would be easy
to add..). You can always go to matlab.py and see how it is
interacting with the gca instance. If you use your 'a' instance
everywhere it uses gca(), you can duplicate it's functionality.
> set(gca(),'xticklabels',) set(gca(),'yticklabels',)
> set(gca(),'xticks',) set(gca(),'yticks',)
the syntax of set is
set(object or sequence, somestring, attribute)
if called with an object, set calls
object.set_somestring(attribute)
if called with a sequence, set does
for object in sequence:
object.set_somestring(attribute)
So for your example, gca() is an object, so
a.set_xticklabels()
a.set_yticklabels()
a.set_xticks()
a.set_yticks()
You may want to take another look at the tutorial section "Controlling
axes properties" which gives examples of both the matlab and OO
methods
To replicate axis, do
a.set_xlim((xmin, xmax))
a.set_ylim((ymin, ymax))
Should help!
JDH