BAR
BAR

Reputation: 17071

MATLAB candle chart handle

When I use

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

hcndl =

  176.0044
  178.0032
  177.0031

How can I use this handle to change the background color of the chart.

Thanks

Upvotes: 0

Views: 1294

Answers (2)

Jonas
Jonas

Reputation: 74940

You want to modify the color of the axes. candle gives you handles to lines, whose parent are the axes you'd like to modify.

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

Upvotes: 1

Biggles
Biggles

Reputation: 1345

I think you're looking for the set function. Set function accepts the handle of the figure and allows you to change the properties of the figure.

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

Upvotes: 3

Related Questions