bugGNU Octave - Bugs: bug #42121, Changing image 'cdata' should...

 
 

bug #42121: Changing image 'cdata' should eventually update 'x/ydata'

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Mon 14 Apr 2014 09:12:50 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
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
   

Mon 07 Jul 2014 06:32:55 AM UTC, comment #2: 
Pantxo Diribarne <pantxo>
Group Member
Tue 15 Apr 2014 05:36:41 PM UTC, comment #1: 

I attached an updated patch (correct bug number and missing descriptions).

(file #31173)

Pantxo Diribarne <pantxo>
Group Member
Mon 14 Apr 2014 09:12:50 PM UTC, original submission:  

When changing 'cdata', Matlab behaves like it has a "x/ydatamode" property, "x/ydata" are updated if the property is "auto".
The property becomes "manual" as soon as the user sets "x/ydata" any value else than empty matrix. Setting "x/ydata" to empty matrix should actually replace current data with default, i.e. [1 npix], and return to "auto" mode.
See the following matlab sesion:


close all
im = image ();
imdata = get (im, 'cdata');
get (im, 'xdata') %% -> [1 64]
set (im, 'cdata', imdata (1:2:end, 1:2:end))
get (im, 'xdata') %% -> [1 32]

close all
im = image ();
imdata = get (im, 'cdata');
set (im, 'xdata', [1 100])
get (im, 'xdata') %% -> [1 100]
set (im, 'cdata', imdata (1:2:end, 1:2:end))
get (im, 'xdata') %% -> [1 100]
set (im, 'xdata', [])
get (im, 'xdata') %% -> [1 32]


I attached a patch that implements this behavior.

Pantxo Diribarne <pantxo>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31173:  auto_image_data_v2.patch added by pantxo (5KiB - text/x-diff)
file #31170:  auto_image_data.patch added by pantxo (5KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Updated the item)
  • -email is unavailable- added by pantxo (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
    2014-07-07 pantxo StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2014-06-21 bpabbott StatusNone Patch Submitted
    2014-04-15 pantxo Attached File- Added auto_image_data_v2.patch, #31173
    2014-04-14 pantxo Attached File- Added auto_image_data.patch, #31170

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code