Ga=EBl Varoquaux wrote:
> I just saw a figure in an article that had been made with gnuplot
> and the author did not bother move the key, that fell right in the curv=
e
> (try "plot [0:1] x" to see what I mean).=20
>=20
> It might be interesting to have by default an automatic choice of
> where the key goes : top right by default, then an choice of top left,
> top middle, bottom right, bottom left, with a small algorithm that woul=
d
> choose the least encumbered part of the graph.
Certainly possible Gael (but little time). An "optimization" algorithm s=
eems rather difficult, i.e., one that identifies the least encumbered par=
t of the graph. It is difficult to define that in the first place.
However, one could take the approach that
1) Compute the size of the key before rendering the plot.
2) Compute the position where that key would land for all nine possible i=
nterior.
3) Keep a C array of counts of how many times a point lands in each of th=
e nine possible key areas.
4) Choose the smallest count to be the key location. If there is a tie, =
impose the priority top right, top left, etc.
It would mean some extra overhead (quite a bit actually) required at the =
low level of laying out points. And I assume you would propose something=
like:
set key auto
? Or simply from now one have "default" mean ostensibly auto placement?
But... I suggest not emarking on such a feature until key layout for 2D a=
nd 3D is made more uniform.
Dan
