octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52184] 'position' axes property value is inco


From: Etienne Dechamps
Subject: [Octave-bug-tracker] [bug #52184] 'position' axes property value is incorrect when using gnuplot toolkit
Date: Sat, 7 Oct 2017 13:06:19 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0

URL:
  <http://savannah.gnu.org/bugs/?52184>

                 Summary: 'position' axes property value is incorrect when
using gnuplot toolkit
                 Project: GNU Octave
            Submitted by: edechamps
            Submitted on: Sat 07 Oct 2017 07:06:18 PM CEST
                Category: Plotting with gnuplot
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

On Debian Sid, octave 4.2.1-4+b1, gnuplot 5.0.7+dfsg1-1:


  octave:1> graphics_toolkit('gnuplot');
  octave:2> fplot(@(x) sin(x), [0 2*pi]);
  octave:3> position = get(gca(), 'position')
  position =

     0.13000   0.11000   0.77500   0.81500



That position vector is wrong. One of the easiest ways to prove that it is
wrong is to try to draw an arrow from one corner of the axes to the other:


  octave:4> annotation('arrow', [position(1) position(1) + position(3)],
[position(2) position(2) + position(4)]);


The arrow position will be incorrect.

Another sign that something is wrong is the following:


  octave:5> set(gca(), 'xtick', []);
  octave:6> position = get(gca(), 'position')
  position =

     0.13000   0.11000   0.77500   0.81500


The reported position did not change even though the actual axes position did
visually change (to fill the space left by the removed ticks). Clearly the
position property is out of sync with the actual position of the axes.

I was able to find a workaround: if I manually set the position property to
something other than its default value using set(gca(), 'position', ...), then
the new axes will accurately follow the new position. The problem is, that's
not a good solution for me because I want the axes to automatically adopt the
optimal size and position, not set it manually.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52184>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]