Postscript problem

I am trying to overlay a polar grid on a previously plotted axis.

The plot looks fine on the screen and in a png file. However, I get an error message when making a postscript file.

Basically, I drew one set of axes in rectangular coordinates and then tried to overlay a polar grid with:
  # Save current axes
  ax = gca()
  l, b, w, h = ax.get_position() # Normalized
  axp = axes([l, b, w, h], polar=True, frameon=False)
  theta = arange(0,1,0.001) * 2*2*pi
  r = array([1.0 for i in range(len(theta))])
  polar(theta, r, color='k')
  angles = arange(0,360,45)
  labels = ('','NE','','NW','','SW', '','SE' '')
  thetalines, thetatext = thetagrids(angles, labels)
  # Restore previous axes
  axes(ax)

I am using a version of the CVS code that I downloaded today, Nov. 30, 2004. I have source code I could send, but I doubt you want an attachment sent to the list.

Here are the messages that appear:
   File "testoverlay.py", line 90, in ?
     savefig('overlay.ps')
   File "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", line 1008, in savefig
     manager.canvas.print_figure(*args, **kwargs)
   File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtkagg.py", line 66, in print_figure
     agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
   File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py", line 385, in print_figure
     ps.print_figure(filename, dpi, facecolor, edgecolor, orientation)
   File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_ps.py", line 570, in print_figure
     self.figure.draw(renderer)
   File "/usr/lib/python2.3/site-packages/matplotlib/figure.py", line 254, in draw
     for a in self.axes: a.draw(renderer)
   File "/usr/lib/python2.3/site-packages/matplotlib/axes.py", line 3125, in draw
     l.draw(renderer)
   File "/usr/lib/python2.3/site-packages/matplotlib/lines.py", line 257, in draw
     lineFunc(renderer, gc, xt, yt)
   File "/usr/lib/python2.3/site-packages/matplotlib/lines.py", line 513, in _draw_dotted
     renderer.draw_lines(gc, xt, yt)
   File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_ps.py", line 275, in draw_lines
     self._draw_lines(gc,points[0:1000])
   File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_ps.py", line 264, in _draw_lines
     self._draw_ps("\n".join(ps), gc, None)
   File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_ps.py", line 375, in _draw_ps
     self.set_linedash(*gc.get_dashes())
   File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_ps.py", line 103, in set_linedash
     if seq:
   File "/usr/lib/python2.3/site-packages/numarray/generic.py", line 477, in __nonzero__
     raise RuntimeError("An array doesn't make sense as a truth value. Use sometrue(a) or alltrue(a).")
RuntimeError: An array doesn't make sense as a truth value. Use sometrue(a) or alltrue(a).

···

--
Ms. Carol A. Leger
SRI International Phone: (650) 859-4114
333 Ravenswood Avenue G-273
Menlo Park, CA 94025 e-mail: leger@...392...