Wind rose - how to remove axis?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Karolina
le 20 Oct 2015
Réponse apportée : TastyPastry
le 20 Oct 2015
I would like to remove axis (circle axis) from a wind rose graph. I have used some of the following options, but they did not worked for wind rose. Is there some other way to remove axis?
set(gca,'XTickLabel',[],'XTick',[]);
set(gca,'YTickLabel',[],'YTick',[]);
0 commentaires
Réponse acceptée
TastyPastry
le 20 Oct 2015
Don't know if there's an updated, more elegant way to do this, but the solution here does it in a roundabout way, which works.
% 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 (1)
Thorsten
le 20 Oct 2015
rose uses polar to plot, so you can remove the lines as you would do for polar http://www.mathworks.com/matlabcentral/answers/102137-how-can-i-remove-the-grid-lines-and-labels-from-a-polar-plot-within-matlab
p = rose(p = rose(rand(1,20)*2*pi);
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
Voir également
Catégories
En savoir plus sur Annotations 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!