[Tioga-users] dealing with log axis
Taro Sato
nomo17k at gmail.com
Mon Jul 9 22:17:14 EDT 2007
On 7/9/07, Vincent Fourmond <vincent.fourmond at 9online.fr> wrote:
> >
> > I often switch between linear and log axis to see which mode looks
> > more useful on the eyes, so being able to do this via some sort of
> > "switch" would be highly desirable! It should be able to
> > automatically put data values on the log scale and place ticks
> > appropriately as well, without touching the input data on the user
> > end...
> >
> > Any thoughts on how to implement this?
>
> I wouldn't wish too much to hardcode this into tioga - or rather, I
> don't want to modify the way the log... options currently behave : it
> would cause me quite some trouble in ctioga - and I think that would
> amount to quite some work (both in tioga and in ctioga).
>
> For a starter, you can create some thin wrappers around the functions
> you use for actually plotting your data to decide whether you should
> take the safe_log10 of it or not.
>
> From my point of view, it is much better to do coordinates conversion
> at the source (one place to modify in the code) rather than in tioga's
> functions (a small hundred of functions to modify ???).
>
> I find that the current scheme fits me really well. But of course, I
> don't know how you are using tioga, so I can't tell for you. Would you
> mind posting some example of your code where this feature is cruelly
> missing ??
>
> BTW, I just realize that you might not know what is this safe_log10 I
> speak about, because it lives in Dvector, which as far as I understood
> is not used by PyTioga. It does what it says for a vector.
>
> What do you think ?
Vincent -- I mean, none of my requests need to be implemented
immediately, so plz don't think first about the amount of "rewrite"
that might need to happen to accommodate my request...haha. Just
meaning to bounce around opinions...
I can live with just having a simple wrapper where needed to have what
I want, so that's not really a problem (I think I can simply decorate
all these methods which take data values). However, the current
tioga behavior is rather confusing (to me) for a couple reasons (oh
please don't think "rewrite" again! just bouncing around ideas...).
First is that users usually want to put their data on log scale on a
plot only when the distribution of values turn out to be more even or
well spread out in log space, and *not* that it makes sense to take
log10 of their data values. When it makes sense for users to take
log10 values of their data, that usually happens when they *want*
log10 values (to adjust to convention, e.g., energy flux to
astronomical magnitudes) to appear on the axis, in which case they
keep that axis in linear scale, with the log10(values). Having users
specify the data values are in log10, as well as having them to
explicitly do the conversion themselves, is rather redundant, I think.
(I'm actually still learning the codes, so it may take a bit before I
start being more explicit about how the current implementation can be
improved without too much fuss...another indication that I'm not
expecting things to happen immediately..)
Taro
More information about the Tioga-users
mailing list