Effacer les filtres
Effacer les filtres

Need help with the 'Area' function!

2 vues (au cours des 30 derniers jours)
Tim Stark
Tim Stark le 3 Mar 2019
Commenté : Tim Stark le 8 Mar 2019
Hey guys,
I have a question regarding the 'Area' function. I have the following code:
A1 = C1(t,1).*25;
A2 = C2(t,1).*-5;
h1 = area(t_Sim(t,1),A1,'LineStyle','none');
hold on
h1(1).FaceColor = [1 0 1];
h2 = area(t_Sim(t,1),A2,'LineStyle','none');
h2(1).FaceColor = [1 0 1];
alpha(.1)
hold off
Resulting in this graph:
The results are perfect, however, I can't get rid of the solid black line at y=0 even though my 'linestyle' is set at 'none'. How can I make sure that this line does not show up?
Am I missing something obvious here? Please let me know! Thanks in advance.

Réponse acceptée

Harshit Jain
Harshit Jain le 6 Mar 2019
LineStyle refers to the style of line around the area. So if you set LineStyle to 'none', then you'll not get any line around the area. If you want to hide y = 0 line then you should set 'ShowBaseLine' to 'off'. You can refer to documentation for more information

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Tags

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by