help-octave
[Top][All Lists]
Advanced

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

Re: Shrinked axes


From: Pantxo
Subject: Re: Shrinked axes
Date: Fri, 11 Oct 2019 04:30:08 -0500 (CDT)

Valdas Jankūnas wrote
> Hello,
> 
> I execute this line in Octave (dev)...
> 
> close all; h_w_1=figure(1,'units','inches','position',[1,0,3,2]);
> h_a_1=axes('units','normalized','outerposition',[0, 0, 1, 1]);
> h_w_2=figure(2,'units','inches','position',[4.3,0,3,2*3]);
> h_a_2=axes('units','normalized','outerposition',[0, 0, 1, 1/3]);
> h_w_3=figure(3,'units','inches','position',[7.5,0,3,2*3]);
> h_a_3=axes('units','normalized','outerposition',[0, 0, 1, 1]);
> 
> ... where three figures are created:
>   - in first figure axes occupy all space of figure;
>   - in second figure axes occupy only third space of figure, but height of
> figure is tripled;
>   - in third figure axes occupy all space of figure which height is
> tripled.
> 
>   As result I got three windows (see attached screenshot).
>   In middle window (Figure 2) I expected (and I think that should be a
> correct result) that size of axes should be same as in left window (Figure
> 1), but instead axes are shrunk vertically.
>   Why? It's a Bug? How to get a result as I expected?
> 
> -- 
>    Valdas Jankūnas
> 
> 
> 
> 
> result.png.png (108K)
> <https://octave.1599824.n4.nabble.com/attachment/4694069/0/result.png.png>

Hi,

There is an internal undocumented axes property "looseinset" that controls
the minimal margins around the axes box. This property is interpreted in the
same units as position, "normalized" here, and has default value [0.13 0.11
0.095 0.075].

In your fig. 1 and 2, which are taller, the axes vertical margins are thus
larger, hence the observed (expected) behavior. Setting axes' "looseinset"
to [0 0 0 0] will let you obtain what you expected, but will probably lead
to other oddities ...

Pantxo



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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