pls help: error using set(gca(),...)

Hi.

I run these codes in ipython command line interface.

from pylab import *
subplot(211)
plot([1,2,3],[1,2,3])
set(gca(), xtickslabel = [])

and got the error saying "Type error: set() does not take keyword arguments"
My OS is windows XP. The code I used is copied from matplotlib tutorial.
Pls help explain why it didnt work.

Thanks.
Sam

···


View this message in context: http://www.nabble.com/pls-help%3A-error-using-set(gca()%2C...)-tp16930305p16930305.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Hi Sam,

Hi.

I run these codes in ipython command line interface.

from pylab import *
subplot(211)
plot([1,2,3],[1,2,3])

There is a small typo (or a wrong method):

set(gca(), xtickslabel = [])

needs to be
setp(gca(), xticklabels = [])

and got the error saying "Type error: set() does not take keyword
arguments" My OS is windows XP. The code I used is copied from matplotlib
tutorial. Pls help explain why it didnt work.

regards Matthias

···

On Monday 28 April 2008 05:09:36 samwo wrote:

"set" is a python built-in (the mathematical set) and matplotlib now
uses "setp" (for set property) instead.

JDH

···

On Sun, Apr 27, 2008 at 10:09 PM, samwo <supatw@...287...> wrote:

Hi.

I run these codes in ipython command line interface.

from pylab import *
subplot(211)
plot([1,2,3],[1,2,3])
set(gca(), xtickslabel = [])

Thank you all for your help.

Regards,
Sam

Matthias Michler wrote:

···

Hi Sam,

On Monday 28 April 2008 05:09:36 samwo wrote:

Hi.

I run these codes in ipython command line interface.

from pylab import *
subplot(211)
plot([1,2,3],[1,2,3])

There is a small typo (or a wrong method):

set(gca(), xtickslabel = [])

needs to be
setp(gca(), xticklabels = [])

and got the error saying "Type error: set() does not take keyword
arguments" My OS is windows XP. The code I used is copied from matplotlib
tutorial. Pls help explain why it didnt work.

regards Matthias

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


View this message in context: http://www.nabble.com/pls-help%3A-error-using-set(gca()%2C...)-tp16930305p16989834.html
Sent from the matplotlib - users mailing list archive at Nabble.com.