2011-04-04 75 views
0

當我使用MATLAB K線圖處理

>> load disney; 
>> hcndl = candle(dis('3/31/98::4/30/98')) 

hcndl = 

    176.0044 
    178.0032 
    177.0031 

如何使用該句柄來更改圖表的背景顏色。

謝謝

回答

3

我想你正在尋找設置功能。 Set函數接受圖形的句柄,並允許你改變圖形的屬性。

handle = candle(dis('3/31/98::4/30/98')); 
set(handle,'BackgroundColor','blue'); 
+0

我得到這樣的結果????錯誤使用==>設置 沒有「BACKGROUNDCOLOR」中的「檢測LineSeries階級屬性。 – BAR 2011-04-04 22:38:12

+0

那我很抱歉。你可能要問父句柄作爲喬納斯建議。我沒有意識到它返回線路系列的句柄。 – Biggles 2011-04-05 06:17:24

1

您想要修改軸的顏色。 candle給你處理到線,其母公司是你想修改的軸。

load disney; 
hcndl = candle(dis('3/31/98::4/30/98')); 

%# find handle to axes using the first of the three handles 
%# note that you could have used any of the three 
axH = get(hcndl(1),'Parent'); 

%# modify axes 
set(axH,'Color','k') %# black color