bugGNU Octave - Bugs: bug #37747, copyobj inconsistent

 
 

bug #37747: copyobj inconsistent

Submitter:  Muhali <muhali>
Submitted:  Thu 15 Nov 2012 01:08:40 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 02 Dec 2012 12:43:04 AM UTC, comment #6: 
Ben Abbott <bpabbott>
Group Member
Mon 19 Nov 2012 03:17:07 PM UTC, comment #5: 

Attached is a patch for this bug.

(file #26933)

Pantxo Diribarne <pantxo>
Group Member
Mon 19 Nov 2012 12:26:11 PM UTC, comment #4: 

It should have been a zero in the first instance and a one in the second. It probably got garbled by the markup system.

Sorry.

Muhali <muhali>
Mon 19 Nov 2012 12:22:26 PM UTC, comment #3: 

On the forwarded mail I read 0 in the first case, 1 in the second. On the bug report web page I read 1. and 1 repsectively. Which one should I trust?

Anyway I will make changes in copyobj to reflect those expected behaviors, and submit a patch here.

Pantxo Diribarne <pantxo>
Group Member
Mon 19 Nov 2012 08:35:13 AM UTC, comment #2: 

ML gives

  1. in the first case

1 in the second.

Muhali <muhali>
Mon 19 Nov 2012 08:24:28 AM UTC, comment #1: 

Thank you for testing.
It looks like in ML the current axes is reset to its previous value when the copy is made in the same figure. I will change that.

What if the copy is made inside a new figure? Can someone test this in ML :



figure (1)
plot (1:10);
ca = gca;
newax = copyobj (ca, figure (2))
ca2 = gca;
disp (ca == ca2)


And what about copying figures :


figure (1)
cf = gcf;
newfig = copyobj (cf, 0)
cf2 = gcf;
disp (cf == cf2)



Pantxo Diribarne <pantxo>
Group Member
Thu 15 Nov 2012 01:08:40 PM UTC, original submission:  


plot(rand(3,1)) ;
title('foo') ;
hdl = copyobj(gca, gcf) ;
title(hdl, '') ;
T = get(get(gca, 'title'), 'string')


Here one would expect T = 'foo' (as in ML). What one gets, however, is the empty string.

Muhali <muhali>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #26933:  copyobj.patch added by pantxo (951B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by muhali (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-12-04 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2012-12-02 bpabbott StatusNone Ready For Test
        Operating SystemGNU/Linux Any
    2012-11-19 pantxo Attached File- Added copyobj.patch, #26933

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code