Changing axes linewidth on a stacked plot

4 vues (au cours des 30 derniers jours)
Elliot Tseng
Elliot Tseng le 26 Fév 2021
Commenté : Elliot Tseng le 8 Mar 2021
I cannot change the axes linewidth on a stacked plot, at least in the way that I am able to change the axes linewidth in other types of plots. For example, I have tried the following with no change to the axes linewidth:
figure(1)
stackedplot(time_axis, testdata)
hAx=gca;
hAx.LineWidth=2;

Réponse acceptée

Adam Danz
Adam Danz le 27 Fév 2021
Modifié(e) : Adam Danz le 3 Mar 2021
You have to access the axis handles first.
h = stackedplot(rand(10,4));
ax = findobj(h.NodeChildren, 'Type','Axes'); % use flipud to puts axes in order.
set(ax,'LineWidth',2)
  1 commentaire
Elliot Tseng
Elliot Tseng le 8 Mar 2021
Thanks Adam, works great.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by