Error: Bad property value for color- why?
古いコメントを表示
Hi, I have following error, which I don't know why it is occurring:
Error using plot
Bad property value found.
Object Name: line
Property Name: 'Color'.
I have many customized colors that I use via a cell:
cl={'w','bla','blat','w2','ora','orat','w3','sbl','sblt','w4','bgr','bgrt','w5','yel','yelt','w6','blu','blut','w7','ver','vert'};
plot([ xx fliplr(xx) xx(1)],[0 0 1 1 0],'color',cl{M{1,m-1}(q)+1},'linewidth',12)
Thanks!
2 件のコメント
Image Analyst
2014 年 7 月 3 日
What is the value of M{1,m-1}(q)? Try this
M{1,m-1}(q) % Spit out to command window
fprintf('M{1,m-1}(q) = %d\n', M{1,m-1}(q)); % Again as integer
Simon
2014 年 7 月 4 日
採用された回答
その他の回答 (1 件)
Image Analyst
2014 年 7 月 3 日
0 投票
Where did you get all those color names? I don't think they're ones that are recognized. Try simple things like 'r', 'y', 'k', etc. as well as 3 element arrays with values between 0 and 1, for example [.2, .3, .7].
2 件のコメント
Simon
2014 年 7 月 4 日
Image Analyst
2014 年 7 月 4 日
No. Because you're putting the name of the variable in there, not the variable itself. It has no idea that the string 'blat' is the name of some variable you created.
カテゴリ
ヘルプ センター および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!