From: Victor Kam on
This is a strange one.

When I do "plot(...)", the figure won't show up.

However, if I do "figure", the figure shows up (as figure 2 of course), and then "plot(...)", the plot shows in figure 2.

Which is fine I suppose, except that I have so old scripts and other people's scripts that no longer work they way they should.

Anybody has any idea why that is the case?
From: Wayne King on
"Victor Kam" <victor.kam(a)gmail.com> wrote in message <i1ihrh$e36$1(a)fred.mathworks.com>...
> This is a strange one.
>
> When I do "plot(...)", the figure won't show up.
>
> However, if I do "figure", the figure shows up (as figure 2 of course), and then "plot(...)", the plot shows in figure 2.
>
> Which is fine I suppose, except that I have so old scripts and other people's scripts that no longer work they way they should.
>
> Anybody has any idea why that is the case?

Hi Victor, what if you do something like

clf reset
plot(randn(100,1));

does it show up as figure 1?

Wayne
From: Victor Kam on
"Wayne King" <wmkingty(a)gmail.com> wrote in message <i1iiah$ep5$1(a)fred.mathworks.com>...
> "Victor Kam" <victor.kam(a)gmail.com> wrote in message <i1ihrh$e36$1(a)fred.mathworks.com>...
> > This is a strange one.
> >
> > When I do "plot(...)", the figure won't show up.
> >
> > However, if I do "figure", the figure shows up (as figure 2 of course), and then "plot(...)", the plot shows in figure 2.
> >
> > Which is fine I suppose, except that I have so old scripts and other people's scripts that no longer work they way they should.
> >
> > Anybody has any idea why that is the case?
>
> Hi Victor, what if you do something like
>
> clf reset
> plot(randn(100,1));
>
> does it show up as figure 1?
>
> Wayne

Yeah, it does!

I suppose the reason is that upon startup I have MATLAB connect to an external API, and whatever it was doing was causing the problem.

Thanks for the tip!