Hello,
I ran into a situation where I have a polar equation which can generate negative radius (Y) values for some ranges of angle (X).
Can you add an option on the Linear/Log Scaling | L. Polar Coordinates | Polar Options dialog to "Force Positive Radial Values" (or some such name) which will convert an (X,-Y) (i.e. theta, -R) point into (X+Pi,+Y) point (assuming angle in radians)?
Plot the following example: Y = 1/(1+1.2*Cos(X)) for x = 0 to 2*pi (every 0.01 radians). This is a polar equation for a hyperbola.
The auto scaling initially creates a polar chart having large positive & negative R values. If you then manually rescale for r= -10 to r = +10, for example, you can see the 'two pieces' of the hyperbola, although distorted. The 2nd piece of the hyperbola is 'mapped' in the negative radius area, but I want to have this 'mapped' in the positive radius area, but with each theta flipped 180 degrees (only if original r is negative).
Also, when polar coordinates are selected, how difficult would it be for you to make the Y = F(X) dialog refer to r = (instead of Y=) and "from theta =," "to theta =", and "with interval dtheta" (except show the actual symbol for theta in dialog AND CURVE LEGEND)? In polar charts I always need to change the default "x" symbol to a "theta" symbol for the legend text.
Ray D.
Polar Plots - Option to Handle Negative Radius Values
Moderator: DPlotAdmin
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Ray,
I don't know that I'd want to automatically shift things like that, but you can manually do it unless I misunderstand. Use Edit>Operate on X with X=if(Y<0,X+pi,X) and then Operate on Y with Y=abs(Y).
Good point about the legend (the dialog, too). The only problem is you'll need to set the scaling to polar first, because once the legend is created the text there is just a bunch of characters as far as DPlot is concerned.
I don't know that I'd want to automatically shift things like that, but you can manually do it unless I misunderstand. Use Edit>Operate on X with X=if(Y<0,X+pi,X) and then Operate on Y with Y=abs(Y).
Good point about the legend (the dialog, too). The only problem is you'll need to set the scaling to polar first, because once the legend is created the text there is just a bunch of characters as far as DPlot is concerned.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
This is done, now, for the legend. But I think I'll likely leave the dialog box alone, otherwise it is too confusing. You don't want the equation to be a function of X but the limits shown as theta. And there's no ASCII theta character you could use in the equation.
Visualize Your Data
support@dplot.com
support@dplot.com
Thanks for your quick reply!
Your solution (Operate on X and Operate on Y) worked just fine.
Could this behavior be made into a 'check box' option on the 'Polar Options' dialog though?
Since negative distance is not permitted in polar coordinates, the convention is to interpret it as a positive distance 180 degrees away.
I will e-mail you a 'before' and 'after' plot to show that using this convention plotted my hyperbola (both 'pieces' that is) in an undistorted way.
Regarding theta vs X, r vs Y: I can see where this could be pretty messy since you would need to make many changes through out DPlot because there are many reference to X and Y in menus, etc.
As far as the theta character, I had to use the 'Insert Symbol' dialog (selected by a button with an 'alpha' character on it), but I see what you mean - the insertion did not place a 'theta' in my equation in the dialog's edit box but rather it placed a text string which is interpreted as a theta when displayed in the legend.
Ray D.
Your solution (Operate on X and Operate on Y) worked just fine.
Could this behavior be made into a 'check box' option on the 'Polar Options' dialog though?
Since negative distance is not permitted in polar coordinates, the convention is to interpret it as a positive distance 180 degrees away.
I will e-mail you a 'before' and 'after' plot to show that using this convention plotted my hyperbola (both 'pieces' that is) in an undistorted way.
Regarding theta vs X, r vs Y: I can see where this could be pretty messy since you would need to make many changes through out DPlot because there are many reference to X and Y in menus, etc.
As far as the theta character, I had to use the 'Insert Symbol' dialog (selected by a button with an 'alpha' character on it), but I see what you mean - the insertion did not place a 'theta' in my equation in the dialog's edit box but rather it placed a text string which is interpreted as a theta when displayed in the legend.
Ray D.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
That's what you and I think because we have similar backgrounds. But for RF and EE guys and others there is nothing unusual about negative radii. But your suggestion to add an option to handle this is easy enough and I'll give it a go.Since negative distance is not permitted in polar coordinates...
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Thanks for your e-mail examples. I've added a "Transform negative radii to angle+PI, abs(radius)" option to the polar plot options. It operates a bit differently than the others in that it actually performs this operation on the data and is therefore not reversible (other than using Undo). In other words checking this option then later unchecking it has no effect. I tried just using this manipulation on the scaling and leaving the data alone, but that leads to a lot of confusion: mins/maxes, mean, standard deviation and other values would not be right - or at least not consistent.
This change will be in the next release.
This change will be in the next release.
Visualize Your Data
support@dplot.com
support@dplot.com