[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plot command sequence behavior
From: |
John W. Eaton |
Subject: |
Re: Plot command sequence behavior |
Date: |
Mon, 24 Mar 2008 15:48:22 -0400 |
On 23-Mar-2008, Bill Denney wrote:
| Daniel J Sebald wrote:
| > I want to confirm the behavior of plot commands. I've noticed that
| > doing a "plot()" wipes away the settings for plot elements. For
| > example, I get
| >
| > title("hi");
| > <a plot appears with no data but a title saying "hi">
| > plot([0:50]);
| > <the plot is updated with the data appearing, but the title "hi" is gone>
| >
| > This isn't very nice. It means after setting up a bunch of plot
| > elements a fresh "plot()" to change the data means having to re-enter
| > the plot elements.
| >
| > Is the above behavior correct?
| >
| > Dan
| Hi Dan,
|
| I think that it is.
Right, the plot function is a "high-level" graphics function so it calls
the newplot function to start a new plot.
| I think that to get the behavior that you want you
| would want to do
|
| title("hi")
| hold on
| plot([0:50]);
Or just add plot decorations after making the plot:
plot (0:50);
title ("hi");
jwe