Post Your Answer
7 years ago in Matlab By Ritu Gupta
How to remove border?
Hey, I need to remove the border of a polar plot using MATLAB, but the problem is I am using MATLAB for the very first time so, I have no idea about how to do it. Please tell me some ways so that I can remove the same.
All Answers (2 Answers In All)
By Brijesh Sharma Answered 7 years ago
Try this instead:
theta = linspace(0,2*pi,500);
r = sqrt(abs(2*sin(5*theta)));
[x,y] = pol2cart(theta, r);
figure(1)
plot(x, y)
hold on
patch([x fliplr(x)], [zeros(size(y)) fliplr(y)], ‘k’, ‘EdgeColor’,’none’)
hold off
axis equal
set(gca, ‘XTick’,[], ‘YTick’,[], ‘XColor’,’none’, ‘YColor’,’none’)
title(‘itFlower Power!rm’, ‘FontSize’,20)
Reply to Brijesh Sharma
By Luv Bhatia Answered 7 years ago
% create the polar plot, and store the line’s handle
p = polar((0:99)*pi/100, (0:99)/100);
%remove lines and text objects except the main line
delete(findall(ancestor(p,’figure’),’HandleVisibility’,’off’,’type’,’line’,’-or’,’type’,’text’));
Reply to Luv Bhatia
Related Questions