[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis corr
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values |
Date: |
Sun, 9 Dec 2018 19:39:51 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063 |
Follow-up Comment #7, bug #55176 (project octave):
Octave is doing the correct thing here. When rho is negative it amounts to a
reflection back through the origin or the addition of 180 degrees to theta.
Matlab's documentation is very clear on this:
https://www.mathworks.com/help/matlab/ref/polar.html.
Negative r values reflect through the origin, rotating by pi (since (theta,r)
transforms to (r*cos(theta), r*sin(theta))). If you want different behavior,
you can manipulate r prior to plotting. For example, you can make r equal to
max(0,r) or abs(r).
It seems like you can achieve what you want by transforming rho prior to
plotting.
## Assuming rho and theta exist
offset = -45; # taken from your data, you could also use min (rho(:));
rhoplot = rho - offset;
h = polar (theta, rhoplot);
The labeling would be off. You could fix that too, but that would involve
adding your own text labels. You could copy the code in polar.m to doo that,
but probably more than you want to do.
Eventually Octave needs to implement polarplot and polaraxes as a separate
base graphics type. polaraxes have an "rticklabel" property that can be set
to whatever you want.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55176>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values, anonymous, 2018/12/06
- [Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values, anonymous, 2018/12/06
- [Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values, Rik, 2018/12/07
- [Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values, Doug Stewart, 2018/12/07
- [Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values, Rik, 2018/12/09
- [Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values, anonymous, 2018/12/09
- [Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values, Doug Stewart, 2018/12/09
- [Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values,
Rik <=
- [Octave-bug-tracker] [bug #55176] polar plot does not plot rho axis correctly for negative rho values, anonymous, 2018/12/10