|
From: Benjamin R. <ben...@ou...> - 2011-02-16 19:43:35
|
On Wed, Feb 16, 2011 at 9:16 AM, Stephan Markus <zw...@we...> wrote: > > Hi, > > I am trying to display some complex values in a polar plot. Displaying > linear magnitude vs. angle - of course - works without any issues. But I'd > rather display the logarithmic magnitute vs. angle. Since the data for the > radius gets negative then, it'll be wrapped around / rotated by 180deg by > matplotlib. > > How can I display negative values for the radius w/o having them rotated by > 180deg? > > Of course I can add an offset to the data before plotting it but since my > plot is interactive and I use the xdata/ydata of events I'd like them to > represent the real data, without an offset. I thought it might be possible > to achieve with a custom transformation but I don't actually get it to > work. > > -Stephan > -- > View this message in context: > http://old.nabble.com/Polar-plot---problem-with-negative-values-for-radius-tp30936638p30936638.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > Stephan, >From the polar axes object, you can call ax.set_rscale('log') and that will automatically make the radial ticks scale and label the axes properly. You can then input the original data as you would without worry of negative values. Let us know how that works for you! Ben Root |