Stacked bar plot, assign "names" to color

How can I assign names to color? In the figure, say, in the right side list, I will assign "Jack's Contribution" to blue instead of "data 6".

Antworten (1)

Scott MacKenzie
Scott MacKenzie am 10 Jun. 2021
Bearbeitet: Scott MacKenzie am 10 Jun. 2021

0 Stimmen

Just add labels to your legend:
labels = { 'Jack', 'Fred', 'abc', 'def' }; % fill out, as desired
legend(labels);

Kategorien

Mehr zu Data Distribution Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 10 Jun. 2021

Bearbeitet:

am 10 Jun. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by