|
Hi David,
The plot function expects an axes handle, not a figure handle. Try the
following:
f = figure;
a = axes;
MyFunction(a, ...);
Inside the function:
plot(a, ... );
I hope that helps.
Thanks.
Rick
"David Doria" <daviddoria@gmail.com> wrote in message
news:fdmcgt$1cj$1@fred.mathworks.com...
> in my script i do
>
> h = figure;
>
> then i have a loop which calls a function 'MyFunction' with
>
> MyFunction(h(1), more_params)
>
> the function definition for MyFunction is
>
> function MyFunction(h, more_params)
>
> inside MyFunction, i do
>
> plot(h, ones(10))
>
> and nothing(!) happens until after the program finishes
> running, at which point i get a blank axis displayed
>
> does it not work like this?
>
> Thanks,
>
> David
|