[Tioga-users] formatting for numeric label
Bill Paxton
paxton at kitp.ucsb.edu
Mon Jul 9 15:36:48 EDT 2007
On Jul 9, 2007, at 12:10 PM, Vincent Fourmond wrote:
> the best solution would be to be able to pass a 'block' to the
> function
Hi,
I like the idea of providing a call-back routine for this, but perhaps
it would be even better to do it at the level of the entire set of
labels
for an axis rather than for individual labels.
Currently, you get the choice of either doing the whole thing yourself
(by supplying arrays of locations and labels) or attempting to get
tioga to do what you want using a bunch of not-so-lovely controls
(such as number of decimal digits, digits max, or tex formatting).
I think we need an intermediate alternative: caller provides a
call-back function that gets a list of proposed locations for
major ticks and returns 2 lists: one the actual locations to be
used for major ticks and the other the strings giving the corresponding
labels (which can of course be null strings to leave a tick unlabeled).
These arrays obviously correspond to the arrays of the current
"do-it-yourself" option mentioned above, but now extended so that
the system provides you with candidate locations based on its
initial calculations of axis sizes.
Incidentally, this also has the benefit of letting the user decide
what to do about
cases where a major tick falls at the corner of a plot. Tioga currently
makes an attempt to deal with this, but it would be great to have a
way to override it.
Comments?
--Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/tioga-users/attachments/20070709/a7f6a6a5/attachment.html
More information about the Tioga-users
mailing list