hold on with mixed plot types

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

hold on with mixed plot types

John W. Eaton-6
What should happen for

  hold on
  plot (x, y);
  semilogy (x, y);

?

jwe

Reply | Threaded
Open this post in threaded view
|

Re: hold on with mixed plot types

James R. Phillips-2
Using matlab for reference behavior, whenever the hold command is issued, it
freezes the axis type.  So semilogy(x,y) would plot the same data on the same
axes.  semilogy(x,y2) would plot different data on the same (linear) axes.

Also, issuing hold on before a plot is created freezes the axes types as
linear.  If the command sequence semilogy(x,y); hold on; plot(x,y2) is issued,
we get y and y2 plotted on a semilog axis.  But if hold precedes the semilogy
command, we get y and y2 plotted on a linear axis.



--- "John W. Eaton" wrote:

> What should happen for
>
>   hold on
>   plot (x, y);
>   semilogy (x, y);
>
> ?
>
> jwe
>
>

Reply | Threaded
Open this post in threaded view
|

Re: hold on with mixed plot types

Bill Denney
In reply to this post by John W. Eaton-6
I think that it should produce a semilogy plot with both data sets on it.
It might be good to have a warning that it's changing the axes as well.

Bill

On Thu, 7 Jul 2005, John W. Eaton wrote:

> What should happen for
>
>  hold on
>  plot (x, y);
>  semilogy (x, y);
>
> ?
>
> jwe
>

--
"I've found that people who are great at something are not so much
convinced of their own greatness as mystified at why everyone else seems
so incompetent."
   -- Paul Graham, http://paulgraham.com/gh.html