Axis labeling code described in “An Extension of Wilkinson’s Algorithm for Positioning Tick Labels on Axes”.
R package containing our implementation of Heckbert’s labeling algorithm, Wilkinson’s, our extensions, and a number of others. This does not yet include the legibility component. You should be able to install it from within R using: install.packages("labeling", repos="http://R-Forge.R-project.org").
C# code on the way.
Hi Justin,
I just read your paper on axis labeling and was very impressed by the results of the algorithm. I am a recent Biochemistry Ph.D. and am interested in developing a specific type of scatter plot program. I have no background in CS other than what I’ve been able to teach myself. I am writing to ask if your axis labeling code will be available in an open source Java implementation? I would like to try to implement your code in my program if possible. Thanks, and good luck with getting your Ph.D.!
I don’t have a Java implementation at the moment. I’m preparing a C# implementation for release in the next few weeks. I have a limited R version working as well. It should be pretty straightforward to port the C# implementation to Java. I’ll let you know when it’s available.
Hi,
I’m working on a Java implementation of your paper “extended Wilkinson axes labeling”. However in your pseudo code of searching algorithm I could not decipher the different notations of the same functions. You gave a definition of simplicity, density and coverage, and I wrote functions with appropriate parameters. But what about the functions of the same name in the inner most loop of your pseudo code.
What you mean for example with a simplicity calculation simplicity(q,j,lmin,lmax,lstep) I can calculate it with Q, i, j, v() as you defined in the paper, What about the unneccary parameters q (if it’s not Q), lmin, lmax, lstep. Same questions about the other two…
Please clarify all such things to be able to usefull. I think your article of Extented Wilkinson algorithm is full with excellent ideas, but it hides a lot due to strange notations and extremely terse sentences. One more example the parameter i. The first question was if it starts from 0 (like C/Java) or from 1. The answer is not found in your paper, but in Wilkinson’s book of GoG.
Sorry you’re having trouble; you point out some valid problems with the description in the paper. I’ll try to get my code out quickly since that would be the clearest answer. However, I’ll try to address your specific questions.
The simplicity, density, and coverage functions in the inner loop are the functions defined in sections 4.1-4.3. For your question about the parameters, I agree that the paper is not completely clear. However, the parameters are used. For example, in the simplicity function I use lmin, lmax, and lstep to determine the value of *v* (whether or not the sequence includes 0). The variable q is the element of Q being used to generate the sequence and it is necessary to compute *i* (e.g. q = Q[i]). However, depending on how you iterate through Q in the outer loop, you may have i already available and you can pass it in directly.
The simplicity_max, density_max, and coverage_max functions used in the outer loops are approximations to the actual functions. They are used to restrict the search space, but not in the final score (that’s why the actual functions have to get called in the inner loop). The approximations are described in the text of section 5. This, I think, is one of the harder things to get directly from the paper.
i does start at 1. I doubt that starting at 0 would have a large impact on the results, but that is a detail I should have included.
Good luck on the implementation. I’ll let you know when my code is out.
Thank you for your relatively rush answer. It clears up my questions some degree. I use a helper function v() in my implementation and that’s why I never thought that these parameters required to calculate v(). My implementation determines v as following:
public int v() {
return (offset == 0 || offset-stepSize == 0) ? 1 : 0;
}
I have “i” already available, and do not require q.
In my current work I’ve done with the nice step size generator, and tested it comparing with Table 1 in a unit test. And I had trouble with search algorithm as I wrote here. If you’ evaluate the search algorithm within your code, please send me this section earlier.
I’ll send you my Java implementation when I’ve done with it, so the people benefit both of them approximately at same time.
Thank you again.