-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Allow negative radial grid values in polar.py #2203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
related to issue #2133 |
I just came across this issue. I've been using a workaround in the mean time.
|
It's natural to want to plot this: It's an antenna gain pattern, plotting gain in dB, going down to -25dB in This was plotted just by removing the test for rmin <= 0 in On 7 July 2013 16:53, Thomas A Caswell notifications@github.com wrote:
Dan Timson Tel: +44 (0)1223 815615 |
I would argue that if there is a 'natural' way to deal with negative radius values, it should be via reflection as discussed in the other issue. I don't know what the best solution it is not obvious. @dmcdougall you have thoughts? |
Why not something along these lines. Reflect any data that falls below |
Personally I have little use for reflected values at all, but it may be counter intuitive to some. For me, I'd advocate clipping data that falls below rmin (just like we would clip data that falls below ymin). I see polar plots as essentially a Cartesian plot which has been mapped into a circle, or even more preferably an annulus (however I don't see how to create a polar plot in the shape of an annulus here). |
I agree - clipping (i.e. if y<rmin, then set y=rmin) is the most On 8 July 2013 19:29, Bradley M. Froehle notifications@github.com wrote:
Dan Timson Tel: +44 (0)1223 815615 |
So, the current behavior (in 1.2.1 and 1.3.0) is to clip values < rmin. If so, what is the value of plotting gridlines at negative values? |
MEP: https://github.com/matplotlib/matplotlib/wiki/MEP24 @bfroehle @dtimson I have created a MEP to deal with this and would like both of your inputs. It is highly unlikely this will get done for 1.4.0, punting to 1.5.x. |
I've taken a look at what's in MEP24. I don't think you need a specified As I said in an email just over a year ago, all that's needed (I assume) is Dan On 29 June 2014 03:41, Thomas A Caswell notifications@github.com wrote:
Dan Timson Tel: +44 (0)1223 815615 |
@dtimson I don't understand what you mean. The reason we clip r<=0 is that it negative r values were turning into effective rotations by pi. This is not a bit of the code base I am familiar with nor use on a regular basis, could you put together a PR showing what you are suggesting? |
OK, if you've got people putting in radial coords with negative radii (!), Dan On 18 July 2014 13:13, Thomas A Caswell notifications@github.com wrote:
Dan Timson Tel: +44 (0)1223 815615 |
The issue was that we have two competing feature requests here.
The original behavior way back when did neither of these, IIRC. Cheers! On Fri, Jul 18, 2014 at 9:13 AM, dtimson notifications@github.com wrote:
|
Is there anyone who actually wants option 2, treating negative radials as a Dan On 18 July 2014 15:01, Benjamin Root notifications@github.com wrote:
Dan Timson Tel: +44 (0)1223 815615 |
Is it possible to have a rminclip={True, False, 'auto'} parameter and support both? If you set the rmin=0 and have clip=False, it goes through the origin and produces an effective rotation by pi. If you have the rmin=-100, and clip=True, then it shows negative dB until they hit -100 and then clips them so they don't go through the origin. 'auto' would be False if rmin == 0 and True otherwise? In dB polar plots, negative and positive radii produce the same magnitude decibel value, so you sometimes see them show polarity as different colors: http://www.sweetwater.com/insync/media/2013/05/supercardioid.gif
Isn't that necessary to make things like http://mathworld.wolfram.com/Rose.html ? |
@dtimson to answer your question: I, for one, was expecting that negative radial values be plotted as rotations by pi. When using radial plots to show vectors, it is standard that a negative magnitude be shown as a positive vector in the opposite direction. |
Yes, dunno why it wasn't tagged before. |
In PolarAxes.set_rgrids(), remove the test for rmin <= 0.
Explanation: while it is possible to plot negative values in a polar plot (e.g. antenna gain down to -30 dB, as a function of azimuth), placing radial grids at negative values is rejected, for no apparent reason.
The text was updated successfully, but these errors were encountered: