Legend Colors not according to figure

조회 수: 2 (최근 30일)
Luciano Silva
Luciano Silva 2019년 12월 18일
답변: ME 2019년 12월 18일
In a previous Matlab version (2012), the legend colors were according to the plot.
2012.png
Now, the same code, in a new version (2015) gives the results below. Note the legend colors.
2015.png
Even in the Matlab help section about legend we see the same problem
mat.png
Is thes a bug? Is there a way to solve it?
Thank you
  댓글 수: 1
Walter Roberson
Walter Roberson 2019년 12월 18일
Yes, it was a bug in that old of a release. If I recall correctly, the work-around involved calling legend() with more than one output, and setting the properties of the objects that are returned from the second output of legend() .
Note that when you call legend() with more than one output in R2014b or newer, then legend() works differently (and has a different set of bugs) than if you call legend() with at most one output.

댓글을 달려면 로그인하십시오.

채택된 답변

ME
ME 2019년 12월 18일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

태그

제품


릴리스

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by