|
From: Ethan M. <merritt@u.washington.edu> - 2005-05-23 05:38:30
|
I have not had much feedback on patchset #1143563
"Place arbitrary rectangles in 2D". Perhaps it does not
do what people really want. So I have been working away
at an alternative approach that does only one thing, but
does it a whole lot better than the previous patchset.
Please take a look, and offer comments or suggestions.
Patchset #1206823 "Boxed text labels"
New option {boxed} for text labels draws a bounding box
around the corresponding text. E.g.
set label 1 "Some multi-line\n comment" boxed
set label 2 "{/Symbol S}f_k^{2n}" boxed
splot "foo" using 2:3:4:1 with labels boxed
I have included a demo script, showing use in 2D and in 3D
(png output uploaded to SourceForge with the patchset).
Box placement is perfect, subject to the limitations of
font and output device. It works independently of
enhanced text mode. The style of the bounding box is
controlled globally by a new command:
set style textbox {opaque|transparent}
The intent is that eventually other style options (text
margins, shape, color, linestyle, etc) could be added
here as well.
This capability is necessarily driver-dependent. I have
implemented it for gd.trm post.trm and x11.trm I
imagine that it would be staightforward to implement in
the TeX-based terminals, but I'll leave that to some
TeX guru.
The implementation adds one new terminal routine
*term->boxed_text(x, y, option)
Option 0: Initialize bounding box to contain only the
point (x,y). Subsequent calls to *term->put_text() will
update the bounding box incrementally
Option 1: Draw the bounding box outline
Option 2: Fill the box with background color
Option 3: Change text margins to x% and y% of default
margins (not implemented yet).
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington 98195-7742
|