image Post Your Answer


image

How to remove border?

6 years ago in Matlab By Ritu Gupta


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 6 years ago

You cannot change much with the polar function. (The polar plot function was introduced in R2016a to make the plot more usable.) 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)


By Luv Bhatia Answered 6 years ago

You can also use this: % 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’));


Your Answer


View Related Questions


asked at 05 Dec, 2019 08:10 in Matlab By Rajiv Bhatia


asked at 25 Apr, 2019 07:18 in Matlab By Prithvi Patel




asked at 02 Feb, 2019 08:12 in Matlab By Aama





asked at 04 Aug, 2018 09:34 in Matlab By Nancy Trivedi