Xstring: Add Location handle (from captions)
Reported by Richard llom
Manual positioning of xstring, besides user-coordinates, involves quite some "code-magic".
Instead it would be better to have the same position handler, which is available for captions:
location
a character string with possible values:
"in_upper_right": captions are drawn in the upper right corner of the axes box.
"in_upper_left": captions are drawn in the upper left corner of the axes box.
"in_lower_right": captions are drawn in the lower right corner of the axes box.
"in_lower_left": captions are drawn in the lower left corner of the axes box.
"out_upper_right": captions are drawn at the right of the upper right corner of the axes box.
"out_upper_left": captions are drawn at the left of the upper left corner of the axes box.
"out_lower_right": captions are drawn at the right of the lower right corner of the axes box.
"out_lower_left": captions are drawn at the left of the lower left corner of the axes box.
"upper_caption": captions are drawn above the upper left corner of the axes box.
"lower_caption": captions are drawn below the lower left corner of the axes box. This option correspond to the leg argument of plot2d
"by_coordinates": the upper left corner of the captions box is given by the "position" field of the associated data structure. The x and y positions are given as fractions of the axes_bounds sizes.
Since this code is already available in scilab it could easily be shared and reused.
Probably also applies for xstringb.