bugGNU Octave - Bugs: bug #49031, Axes "position" wrong...

 
 

bug #49031: Axes "position" wrong after "axis equal"

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Thu 08 Sep 2016 03:13:50 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug 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

Fri 09 Sep 2016 04:54:19 PM UTC, comment #7: 

@Markus: happy you jumped in.

Closing this report as invalid.

Pantxo Diribarne <pantxo>
Group Member
Fri 09 Sep 2016 04:33:47 PM UTC, comment #6: 

I opened a new bug for this issue (bug #49038) and attached a changeset there that should fix the issue that "axis equal" affects the aspect ratio of the axes.

Pantxo, I hope I didn't interfere.

Markus Mützel <mmuetzel>
Group administrator
Fri 09 Sep 2016 09:22:48 AM UTC, comment #5: 

The problem might be that "plotboxaspectratio" cannot be set or is overwritten each time it is set (in graphics.cc?).

hax = axes ();
get (hax, 'plotboxaspectratio')
get (hax, 'plotboxaspectratiomode')
image (rand (3, 10))
axis equal
get (hax, 'plotboxaspectratio')
get (hax, 'plotboxaspectratiomode')
set (hax, 'plotboxaspectratio', [1 1 1])
get (hax, 'plotboxaspectratio')
get (hax, 'plotboxaspectratiomode')


Setting the "plotboxaspectratio" is ignored even if "plotboxaspectratiomode" is correctly set to "manual".

Markus Mützel <mmuetzel>
Group administrator
Thu 08 Sep 2016 09:34:38 PM UTC, comment #4: 

There's definitely something weird here.  It doesn't seem to me that axis equal should change the position property at all.  axis() is about changing the scale of the xticks.

Rik <rik5>
Group administrator
Thu 08 Sep 2016 08:52:41 PM UTC, comment #3: 

Sorry for the noise! I found this function [1], written for matlab, to perfectly predict the actual onscreen position in Octave too :-).

In short, the position in 2D is actually the rectangle into which you have to make your axes fit. When pbaspect and daspect are "auto" the axes fills the whole box, but when one is manual this is not the case anymore.

I'll close this report and eventually submit another one about the fact that "axis equal" still don't behave the same in ML and Octave.

[1] https://github.com/kakearney/plotboxpos-pkg

Pantxo Diribarne <pantxo>
Group Member
Thu 08 Sep 2016 04:33:11 PM UTC, comment #2: 


>>Does anything happen to the 'position' settings if you resize the window?


No.

Pantxo Diribarne <pantxo>
Group Member
Thu 08 Sep 2016 03:52:08 PM UTC, comment #1: 

Equal axis mode should adjust position based upon the sizing of the figure window, i.e., the aspect ratio, whether this reflects in the properties or not.  Does anything happen to the 'position' settings if you resize the window?  (We know gnuplot toolkit can't affect the property values because there currently is no feedback mechanism.)

Dan Sebald <sebald>
Thu 08 Sep 2016 03:13:50 PM UTC, original submission:  

After calling "axis equal", the length of x and y axes is changed onscreen but the "position" property of the axes does not reflect this change:


hax = axes ();
get (hax, 'position')
image (rand (3, 10))
axis equal
get (hax, 'position')


I tested this example in Matlab: neither the axes "position" property nor the onscreen axes position are changed.

IMHO not being able to trust the axes "position" property is a pretty severe bug.

Pantxo Diribarne <pantxo>
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 mmuetzel (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by sebald (Posted a comment)
  • -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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-09 pantxo StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2016-09-08 rik5 StatusInvalid / Not an Octave Bug None
        Open/ClosedClosed Open
    2016-09-08 pantxo StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2016-09-08 pantxo CategoryPlotting Plotting with OpenGL

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code