bugGNU Octave - Bugs: bug #43585, rectangle wrong axis calculation

 
 

bug #43585: rectangle wrong axis calculation

Submitter:  Andreas Weber <andy1978>
Submitted:  Wed 12 Nov 2014 10:38:07 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 16 Dec 2016 10:59:27 PM UTC, comment #2: 

This issue is (slightly changed) still present in Octave 4.2.0.

When I run the code from comment #0, then afterwards axis() gives me

ans =
   0.00000   6.00000   0.13387   4.86613

So the calculation of the x-limits has improved, but the y-limits are still off. Accordingly, the top (and bottom) line of this square are still not displayed in the figure.

Hartmut <hardy>
Tue 03 Feb 2015 05:50:55 AM UTC, comment #1: 

The problem seems to be that the C++ xlim and ylim updaters are called when the following code is executed in patch.m


  ## FIXME: This is a hack to get 'layer' command to work for 2D patches
  ##        Alternative is much more complicated surgery in graphics.cc.
  ##        of get_children_limits() for 'z' axis and 'patch' object type.
  if (! ishold ())
    if (isempty (get (htmp, "zdata")))
      set (hax, "zlim", [-1 1]);
    endif
  endif



Rik <rik5>
Group administrator
Wed 12 Nov 2014 10:38:07 AM UTC, original submission:  

Since cset 75f8926deef1 the following code only shows the axes because axis limits are calculated wrong.


scatter ([3 5 6], [4 2 1])
axis equal
rectangle ('Position', [0, 0, 5, 5]);


axis () returns

ans =
   1.7500   4.2500   1.5000   3.5000


so no scatter point or rectangle is visible. Octave 3.8.2 and default cset 10082673a8f0 (parent of 75f8926deef1) returns for axis:


ans =
  -0.12500   6.12500   0.00000   5.00000


which is okay. Btw, the "error: set: "zlim" is read-only" for rectangle, introduced from cset 75f8926deef1, was fixed with cset 87c3848cf3c0.

Andreas Weber <andy1978>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by andy1978 (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-22 mtmiller CategoryNone Octave Function
    2015-02-03 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code