Ben,

I should have mentioned that I already tried that. When I set the rscale to
'log' the plot crashes when zooming or mpl cannot even create it.

Maybe some example code will help:
----------------
from numpy import arange, sin, pi, cos, ones
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,
NavigationToolbar2TkAgg
from matplotlib.figure import Figure
import Tkinter as Tk

root = Tk.Tk()


f = Figure(figsize=(5,4), dpi=100)
ax = f.add_subplot(111, projection='polar')

t = arange(0.0,2*pi,0.01)
s1 = ones(len(t))*10

ax.set_rscale('log')
ax.plot(t,s1)


canvas = FigureCanvasTkAgg(f, master=root)
canvas.show()
canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
toolbar = NavigationToolbar2TkAgg(canvas, root)
toolbar.update()
canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
Tk.mainloop() 
----------------

Using this code the plot will show up but you can see the 10^-1 and 10^-2
tick labels overlapping in the center. Ok, it shouldn't be a big deal to get
rid of them. The major problem is if you try to zoom out, the tick labels
move away from the center and if you try to zoom into the plot it eventually
throws an exception "ValueError: cannot convert float NaN to integer".
If you try to plot smaller values (e.g. replacing the line 's1 =
ones(len(t))*10' with 's1 = ones(len(t))') mpl also throws an ValueError
exception and does not even create the plot.

Let me know if you need full tracebacks.

Btw: I am using Matplotlib 1.0.1 and Python 2.6.0 on Windows 64.
-- 
View this message in context: 
http://old.nabble.com/Polar-plot---problem-with-negative-values-for-radius-tp30936638p30947935.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to