我有四個SFIT對象,我與情節:改變從SFIT表面圖的顏色MATLAB
figure;
hold on;
plot(f1);
plot(f2);
plot(f3);
plot(f4);
這繪製一個三維曲面。 但是我想給每個表面一個獨特的顏色,就像它在繪圖函數中很常見一樣。
plot(f1,'r');
但是,如果我這樣做是在這裏,我得到以下錯誤:
Error using plot No value was given for 'r'. Name-value pair arguments require a name followed by a value.
Error in sfit/plot>iParseInputs (line 231) p.parse( parameterValuePairs{:});
Error in sfit/plot (line 44) [XY, Z, in, out, style, level, hParent] = iParseInputs(obj, varargin{:});
這表明,這通常是通過給予指示的顏色,像放慢參數「R」或辦什麼事必須有一個字符串給,但哪一個?我已經嘗試了'Color'或'LineColor'之類的東西,但這些都不被識別
簡化問題:我想要代表擬合對象的平面具有一種顏色。每架飛機都有不同的一架。
謝謝你的回答,但是這不完全是我想要的。首先使用繪圖(f1,'樣式','輪廓'),只會導致一個2D繪圖,我有一個3D繪圖。當簡單地使用繪圖(f1) - 因此繪圖仍然是3D時,調用set的函數會給出錯誤:「Surface類沒有填充屬性」 – Kev1n91
@ Kev1n91嗯,看我的編輯 – Wolfie
謝謝,這個鏈接是一個矯枉過正的點滴,但我找到了正確的路線,簡單地說:figure; h = plot(f1);設置(h(1),'FaceColor','r')。我不確定這個問題是否重複。但是,如果您可以在答案中插入該代碼段,我會接受它。 – Kev1n91