octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: more graphics changes - subplots overlap


From: John W. Eaton
Subject: Re: more graphics changes - subplots overlap
Date: Wed, 21 Mar 2007 17:05:33 -0400

On 21-Mar-2007, David Bateman wrote:

| Ok, it appears that the latest changes you made in the CVS fixed this
| issue, however it created another, though I'm not sure its a bug.
| 
| Consider the code
| 
|     figure(1);
|     x=1:0.01:10;
|     subplot(121);
|     xlabel("X");
|     title ("Sin(x)");
|     ylabel("Y");
|     plot (x,sin(x));
|     subplot (122);
|     xlabel("X");
|     title ("Cos(x)");
|     ylabel("Y");
|     plot (x, cos(x));
| 
| In 2.9.9 it correctly prints the title, xlabel and ylabel of the plot,
| however in the CVS of a few minutes ago, It fact even just
| 
|     figure(1)
|     x=1:0.01:10;
|     xlabel("X");
|     title ("Sin(x)");
|     ylabel("Y");
|     plot (x,sin(x));
| 
| is sufficient to show the issue... To get the text to appear requires
| the above to be rewritten as
| 
|     figure(1)
|     x=1:0.01:10;
|     plot (x,sin(x));
|     xlabel("X");
|     title ("Sin(x)");
|     ylabel("Y");
| 
| or adding "hold on" as in
| 
|     figure(1)
|     x=1:0.01:10;
|     hold on;
|     xlabel("X");
|     title ("Sin(x)");
|     ylabel("Y");
|     plot (x,sin(x));
| 
| Is this what matlab does?

Yes.

| Was it a deliberate choice to handle things this way?

Yes.  Functions like plot call newplot, which clears the current axes
object, so the labels are deleted.  I don't think it was just the
recent change that made the difference.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]