Hold doesn't work as expected in 3.0.3
John W. Eaton
jwe at bevo.che.wisc.edu
Tue Oct 21 21:03:11 CDT 2008
On 21-Oct-2008, Alexander Mamonov wrote:
| Bug report for Octave 3.0.3 configured for i486-pc-linux-gnu
|
| Description:
| -----------
|
| Consider the following piece of code:
|
| figure(1); clf;
| hold on;
| title('ABC');
| plot([1,2],[1,2],'b-');
| plot([1,2],[2,1],'r-');
|
| Expected behavior is that Octave would turn hold on for the figure,
| and each successive plot would not overwrite the previous one.
| This is indeed the behavior in 3.0.1 and 3.0.2. But in 3.0.3 hold
| is not turned on for some reason, and so only the last (red) line is displayed.
|
| Changing the order of commands to
|
| figure(1); clf;
| title('ABC');
| hold on;
| plot([1,2],[1,2],'b-');
| plot([1,2],[2,1],'r-');
|
| fixes the problem, however it requires making changes to numerous scripts
| that used to work OK with the previous versions of Octave (and Matlab).
|
| Repeat-By:
| ---------
|
| figure(1); clf;
| hold on;
| title('ABC');
| plot([1,2],[1,2],'b-');
| plot([1,2],[2,1],'r-');
Please try the following patch.
Jaroslav, this changeset should be applied to the 3.0.x branch. It is
a portion of changeset
changeset: 8075:a028a5960e18
user: David Bateman <dbateman at free.fr>
date: Fri Aug 29 15:48:44 2008 -0400
summary: Fix for hold with no figures/axes. Set prop/val pairs to hggroups rather than underlying objects. Fix for equality test in array_property
but I don't think the rest of it should be applied.
Thanks,
jwe
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
Url: https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20081021/5213dfa5/attachment.ksh
More information about the Bug-octave
mailing list