Dear Sir/Madam,
In my horizontal bar chart MATLAB has given specific colors for each bar. I'd like to use the same colors in another graph. How can I get these facecolors?
Best regards,
Jelle

 채택된 답변

Ben11
Ben11 2014년 8월 1일
편집: Ben11 2014년 8월 1일

0 개 추천

Use the handles to the bar graph to retrieve its 'FaceColor' property.
Eg:
hbar1 = hbar(data,SomeColor);
Then you can get the color specifications with:
get(hbar1,'FaceColor');
and apply it to another graph:
hbar2 = hbar(data2,get(hbar1,'FaceColor'));

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기

질문:

2014년 8월 1일

편집:

2014년 8월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by