|
From: Daniel J S. <dan...@ie...> - 2007-06-28 22:18:22
|
Ethan Merritt wrote: > On Thursday 28 June 2007 14:32, Daniel J Sebald wrote: > >>Ethan Merritt wrote: >> >>>My request was simply that you leave the existing >>>log scale code in place until a general mechanism was ready to replace it. >> >>What do you mean by general? Able to apply mappings other than log scale? > > > Exactly. I gave a bunch of examples earlier. > The most common request (and hardest to work around) is marking off the > X-axis as 1/x. For instance, we crystallographers have to deal with > inconsistent usage all the time; some quantities are given in terms of > energy while others are given in terms of wavelength. There is an > inverse relationship: > Energy = k / Wavelength > where k is an appropriate constant. It is a pain to try to persuade > gnuplot to mark off both Energy and Wavelength on axes of the same plot. > > I would like to be able to do something like: > > set axis x1 x # will use for Energy > set axis x2 k/x # will use for Wavelength > set axis y1 log(y) # log scale value to be plotted > > Even better if there is a way to automatically lock x1 to x2, so that > they are forced to span the same range. Sounds good. I don't think anything I've done would effect the ability to provide such options. Basically, LOG/DE_LOG could be MAP/UNMAP or some variation with functions. There should be pairs of functions, one being the inverse function of the other. For the sampled functions, instead of axis_unlog_interval(x_axis, &t_min, &t_max, 1) probably axis_linearize_interval() because that is what we are trying to do, i.e., some parameterization that for which linear spacing results in linear spacing on the scale whatever it is. Not too difficult, I think, but I'd say get data storage squared away first. Dan |