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

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

[Octave-bug-tracker] [bug #39326] initial "tightinset" is wrong


From: Ben Abbott
Subject: [Octave-bug-tracker] [bug #39326] initial "tightinset" is wrong
Date: Sun, 23 Jun 2013 11:14:06 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36

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

                 Summary: initial "tightinset" is wrong
                 Project: GNU Octave
            Submitted by: bpabbott
            Submitted on: Sun 23 Jun 2013 07:14:05 AM EDT
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Inaccurate Result
                  Status: None
             Assigned to: None
         Originator Name: Ben Abbott
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

The frontend doesn't initialize the "tightinset" correctly.


figure (1, '__graphics_toolkit__', 'fltk')
clf ()
plot (rand (3))
set (findall (gcf (), '-property', 'fontsize'), 'fontsize', 10)
tightinset = get (gca (), 'tightinset');
position = get (gca (), 'position');
outerposition = get (gca (), 'outerposition');
looseinset = get (gca (), 'looseinset');

matlab_looseinset = [0.13, 0.11, 0.095, 0.075];
matlab_tightinset = [0.0393, 0.0381, 0.0089, 0.0190];
matlab_position = [0.13, 0.11, 0.775, 0.815];
matlab_outerposition = [0, 0, 1, 1];

printf ('\nMatlab "position"      = [%.5f, %.5f, %.5f, %.5f]"\n', double
(matlab_position))
printf ('Octave "position"      = [%.5f, %.5f, %.5f, %.5f]"\n', double
(position))
printf ('Matlab "outerposition" = [%.5f, %.5f, %.5f, %.5f]"\n', double
(matlab_outerposition))
printf ('Octave "outerposition" = [%.5f, %.5f, %.5f, %.5f]"\n', double
(outerposition))
printf ('Matlab "tightinset"    = [%.5f, %.5f, %.5f, %.5f]"\n', double
(matlab_tightinset))
printf ('Octave "tightinset"    = [%.5f, %.5f, %.5f, %.5f]"\n', double
(tightinset))
printf ('Matlab "looseinset"    = [%.5f, %.5f, %.5f, %.5f]"\n', double
(matlab_looseinset))
printf ('Octave "looseinset"    = [%.5f, %.5f, %.5f, %.5f]"\n', double
(looseinset))


Running the script above, produces the result below.


Matlab "position"      = [0.13000, 0.11000, 0.77500, 0.81500]
Octave "position"      = [0.13000, 0.11000, 0.77500, 0.81500]
Matlab "outerposition" = [0.00000, 0.00000, 1.00000, 1.00000]
Octave "outerposition" = [0.00000, 0.00000, 1.00000, 1.00000]
Matlab "tightinset"    = [0.03930, 0.03810, 0.00890, 0.01900]
Octave "tightinset"    = [0.13000, 0.11000, 0.09500, 0.07500]
Matlab "looseinset"    = [0.13000, 0.11000, 0.09500, 0.07500]
Octave "looseinset"    = [0.13000, 0.11000, 0.09500, 0.07500]


The tight inset should be set equal to the difference between the axes
bounding box (including the title, {x,y,z}labels and {x,y,z}ticklabels) and
the axes "position" (which is just the bounding box for the axes' plot area). 
See the link below for more information.

http://www.mathworks.com/help/matlab/creating_plots/automatic-axes-resize.html

The "looseinset" is an undocumented Matlab property.  There is some info on it
from non-mathworks sources.

http://undocumentedmatlab.com/blog/axes-looseinset-property/

(Note: This bug/feature prevents legend() from consistently rendering a proper
result)




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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