How can i put an edge color on a specific bar?

37 Ansichten (letzte 30 Tage)
yashvin
yashvin am 5 Aug. 2015
Kommentiert: yashvin am 6 Aug. 2015
Hi
y = [2 4 3];
b = bar(y);
b(1,2).LineWidth = 2;
b(1,2).EdgeColor = 'red';
I want to change only the second bar edge to red. How can i do it?

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 5 Aug. 2015
y = [2 4 3];
b = bar(y);
hold on
h=bar(y(1:2))
set(h,'EdgeColor', 'red','LineWidth', 2);

Weitere Antworten (0)

Kategorien

Mehr zu Dialog Boxes finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by