[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 21:40:12 -0400 |
On 24-Mar-2008, Daniel J Sebald wrote:
| John W. Eaton wrote:
|
| > Then use
| >
| > set (gca (), "xdata", new_xdata, "ydata", new_ydata);
|
| That concept works, but it'd be:
|
| set(get(gca(),"children"), "xdata", [1:30], "ydata", 2*[1:30])
Oops, yes, except that the axes could have more than one child, so
probably you would want to hold on to the handles returned by the plot
function so you could modify the individual lines:
h = plot (...);
set (h, ...);
If you are only plotting one line, this is easy. Otherwise, you have
to deal with the multiple handles returned by plot (one for each
line).
I agree its a bit messy, but I don't see that we have much of a
choice given that compatibility is a high priority for most users.
jwe