How to plot only half of a polar plot? (i.e. only the lower hemisphere from 90-270)
23 views (last 30 days)
Show older comments
Hi guys, I require a polar plot to present my data, however I only want to visually plot and represent the lower half of the polar. I wish for it to display only a lower hemisphere semi-circle from 90-270 and not the rest from 0-90 or 270-360.
If anyone knows how I can produce this I would be extremely grateful!
thanks, Mark.
3 Comments
Derek Burrage
on 7 Sep 2018
I have the same problem, but with a complication: My Theta scale follows navigational convention (compass directions) with 0 up (north), 90 right (east), 180 down (south) and 270 left west. I want to plot only the upper half plane, but set(gca,'thetalim',[270,90]) gives an error because the second element must be larger than the first, and reversing the limits yields the lower half plane. A rather unsatisfying work around is to create two figures one for the NW quadrant and one for the NE, and combine them in a graphics editor. I hope someone can suggest a more elegant solution!
Jacob Ward
on 26 Dec 2018
@Derek Burrage
This should do the trick:
thetalim([-90 90])
Accepted Answer
Grzegorz Knor
on 17 Oct 2011
figure
t = 0:.01:2*pi;
polar(t,sin(2*t).*cos(2*t),'--r')
ylim([-0.5 0])
2 Comments
xing chen
on 21 Aug 2018
If you are plotting values in degrees instead of radians, use:
xlim([-180 0]);
More Answers (1)
Steven Lord
on 11 May 2017
This is an old discussion, but if you're using a release that includes the polaraxes and polarplot functions, you can do this using those functions.
% Create a polaraxes
ax = polaraxes;
% Define the data to plot
r = cosd(0:360);
% Plot the data
polarplot(ax, r);
% Update the theta limits of the polaraxes to show just the first quadrant
ax.ThetaLim = [0 90];
1 Comment
Derek Burrage
on 7 Sep 2018
This does not quite address the original problem, which was to plot the lower half plane, not just one quadrant. Fine if you do not want the upper half plane in navigational convention - see my previous comment. Thanks, Derek
See Also
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!