How can I remove the grid lines and labels from a polar plot within MATLAB?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have created a plot with the POLAR function from which I want to remove the grid lines and labels. However, changing the axes' properties does not affect the polar plot.
Réponse acceptée
MathWorks Support Team
le 31 Août 2010
There are no actual polar axes in MATLAB 6.5.1 (R13SP1) and earlier versions. The polar plot is created with a patch object representing the background, and multiple line and text objects used to create the grid lines and labels, respectively. These objects exist in an axes, whose "Visible" property has been set to "off".
You can remove the labels and grid lines from a polar plot by locating their handles with the FINDALL function, and using the DELETE function to remove them.
% create the polar plot, and store the line's handle
p = polar((0:99)*pi/100, (0:99)/100);
% find all of the lines in the polar plot
h = findall(gcf,'type','line');
% remove the handle for the polar plot line from the array
h(h == p) = [];
% delete all other lines
delete(h);
% find all of the text objects in the polar plot
t = findall(gcf,'type','text');
% delete the text objects
delete(t);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Polar Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!