Dears, I'm trying to change the labels of a polar plot I have inside a
wxpython app, but keep getting errors...

this is a snippet of the code:

#class for the second page of the notebook
class PlotPanel(wx.Panel):
        def __init__(self, parent):
                wx.Panel.__init__(self, parent)

                box1 = wx.BoxSizer(wx.VERTICAL)
                st1 = wx.StaticText(self, -1, 'Plot')
                box1.Add(st1, 0, wx.RIGHT, 8)
                box3 = wx.BoxSizer(wx.VERTICAL)

                self.figure = Figure(figsize=(6,6))#
                self.canvas = FigureCanvas(self, -1, self.figure)
                self.axes = self.figure.add_axes([0.1, 0.1, 0.8, 
0.8],projection='polar')

                pylab.thetagrids( range(0,360,45), ('E', 'NE', 'N','NW', 'W', 
'SW',
'S', 'SE') )

                box3.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW)

                box1.Add(box3,1, wx.EXPAND)
                self.SetSizer(box1)


and these are the error msgs:

 python pystereo12.py
Traceback (most recent call last):
  File "pystereo12.py", line 184, in <module>
    app=pystereo()
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7912, in __init__
    self._BootstrapApp()
  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7487, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "pystereo12.py", line 179, in OnInit
    self.frame=MyFrame(None, -1, 'PyStereo', size=(800,600))
  File "pystereo12.py", line 120, in __init__
    self.right_panel = PlotPanel(splitter) # right panel, where stats are shown
  File "pystereo12.py", line 70, in __init__
    pylab.thetagrids( range(0,360,45), ('E', 'NE', 'N','NW', 'W',
'SW', 'S', 'SE') )
  File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line
1092, in thetagrids
    raise RuntimeError('rgrids only defined for polar axes')
RuntimeError: rgrids only defined for polar axes


TIA

Carlos

-- 
Carlos Henrique Grohmann - Geologist D.Sc.
a.k.a. Guano - Linux User #89721
ResearcherID: A-9030-2008
carlos dot grohmann at gmail dot com
http://www.igc.usp.br/pessoais/guano/
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke

Can’t stop the signal.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to