polar plot draw issue

1 view (last 30 days)
Peter Morley
Peter Morley on 29 Apr 2017
Commented: Star Strider on 1 May 2017
I am currently using polarplot and hold on to draw multiple rho, theta datasets onto on polar plot. To prevent rescaling of the polar plot I find the dataset with the largest rho value and draw that first. My problem is that datasets with small rho values seem to not show up. The rho ranges from 8-240 and rho values with 75 or greater are shown but rho values less than seem to be partially visible or completely gone. Any one encounter this issue?

Answers (1)

Star Strider
Star Strider on 30 Apr 2017
Since all the ‘rho’ values are greater than 1, I would be tempted to plot log(rho).
Is that a viable option in your application?
  4 Comments
Peter Morley
Peter Morley on 30 Apr 2017
The computer I have access to has 2015a so I have to use polar. It makes sense that a line will not appear if the values for theta and rho are [PI/4 PI/4] and [253 253]. Is there a way for a polar data set that does not change to be visible as a dot on a polar graph. The example code below is what I have used to demonstrate the issue. The last dataset will not show up because the values don't change.
close all
figure
thetavector = [45 45; 45 45; 45 45; 45 45; 45 45; 45 45; 45 45];
rhovector = [8.2 8.25; 13.8 13.85; 45.0 45.05; 62.0 62.1; 120.0 120.5; 186.3 186.1; 243.5 243.5];
%first draw largest rho dataset
polar(thetavector(7,:)* 3.14/180.0, rhovector(7,:));
hold on;
for x = 1 : 7
h1 = polar(thetavector(x,:)* 3.14/180.0, rhovector(x,:));
set(h1,'linewidth',10)
hold on;
end
Star Strider
Star Strider on 1 May 2017
The polar function is unfortunately resistant to altering any of its properties. It was easy enough to take the log of ‘rhovector’, although relabeling the ticks as the exp of those so the tick labels would have the correct magnitudes proved to be impossible.
If you want to have the polar plot of your data have the correct appearance, you will have to use the polarplot function, or create your own. This is probably not difficult, but will be time consuming. The pol2cart function will be helpful if you want to do that.

Sign in to comment.

Categories

Find more on Polar Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!