fabien van mook

all packages "fvm-*"

package "fvm-miscellaneous"

function file "better_legend_pos.m"

Function better_legend_pos()
         better_legend_pos(given_extents)

ensures that the legend is put above the data points in
the current figure.

The figure is nicely printed in Octave 8.3 by e.g.:
  print("-dpdfcrop",filename,"-bestfit");

Two major assumptions:
-- the legend is at location northeast. If there is not
   one legend, the function does nothing.
-- if input argument given_extents is given or has the
   value true, the extents of the axes of the plot must be
   approximately good before calling better_legend_pos().
   The upper bound of the y axis will be slightly changed
   to make space for the legend, but the given lower bound
   of the y axis will not be changed.

Option {"location","best"} has not yet been implemented
in Octave 6.2, nor even in Octave 8.3!


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-miscellaneous" under GNU GPLv3+