I was playing around with polar plots and trying to alter the grid labels when I ran into some weird errors. Whenever I call pyplot.thetagrids() (and similarly with rgrids) I get:

>>> AttributeError: 'PolarAxesSubplot' object has no attribute 'thetagridlines

After searching the MPL directory, it didn't seem like thetagridlines was defined anywhere. Alternatively, If I call thetagrids with an argument [e.g. thetagrids(range(45,360,90))], I get

>>> TypeError: 'NoneType' object is not iterable

which comes from the following line in pyplot:

>>> lines, labels = ax.set_thetagrids(*args, **kwargs)

Strangely, the set_thetagrids method of PolarAxes doesn't return any values and this is causing the TypeError above.

I'm really confused about these errors. Any help would be greatly appreciated.

-Tony

PS: Full tracebacks are shown below.
I'm on MPL trunk, r5588.

CASE 1:
------------
Traceback (most recent call last):
  File "polar.py", line 19, in <module>
    lines, labels = thetagrids()
File "/Users/Tony/python/matplotlib/trunk/matplotlib/lib/matplotlib/ pyplot.py", line 984, in thetagrids
    lines = ax.thetagridlines()
AttributeError: 'PolarAxesSubplot' object has no attribute 'thetagridlines'

CASE 2:
------------
Traceback (most recent call last):
  File "polar.py", line 19, in <module>
    lines, labels = thetagrids(range(45,360,90))
File "/Users/Tony/python/matplotlib/trunk/matplotlib/lib/matplotlib/ pyplot.py", line 987, in thetagrids
    lines, labels = ax.set_thetagrids(*args, **kwargs)
TypeError: 'NoneType' object is not iterable

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to