Hi,

I am new to this list, so forgive me if this has been asked before. I am trying to do a radial plot and the following code does not seem to work:

# ------< START CODE >-------

import pylab
import matplotlib

fig = pylab.figure(figsize=(8,8))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True)

pylab.hold(True)
ax.plot([4.189, 4.188],[41.347, 41.058], color = ‘green’, lw=1)
#ax.plot([4.199, 4.188],[41.347, 41.058], color = ‘green’, lw=1)
ax.set_rmax(80) # scale plot
pylab.show()

# ------< END CODE >-------

When you run this, the entire background of the plot turns green. If you comment out the first “ax.plot” and uncomment the line below it, it works as expected. Any ideas as to what is going on? Is there some kind of limitation to the smallest line allowed? Thanks for any help!

—Nick

Nick Susch wrote:

Hi,

I am new to this list, so forgive me if this has been asked before. I am trying to do a radial plot and the following code does not seem to work:

# ------< START CODE >-------
import pylab
import matplotlib

fig = pylab.figure(figsize=(8,8))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True)

pylab.hold(True)
ax.plot([4.189, 4.188],[41.347, 41.058], color = 'green', lw=1)
#ax.plot([4.199, 4.188],[41.347, 41.058], color = 'green', lw=1)
ax.set_rmax(80) # scale plot
pylab.show()
# ------< END CODE >-------

When you run this, the entire background of the plot turns green. If you comment out the first "ax.plot" and uncomment the line below it, it works as expected. Any ideas as to what is going on? Is there some kind of limitation to the smallest line allowed? Thanks for any help!

It may be that the line is too close to unity and Agg (the rendering engine) is messing up. That's the best explanation I can think of as well...

However, it does seem like other backends (Ps, Pdf, Cairo) do work. You may try using those as a workaround for now.

Note that the SVN trunk also works, possibly due to a) upgrading Agg 2.3 to 2.4, and b) a pretty radical overhaul of the rendering engine, particularly polar plots.

Mike

···

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA