|
From: Hans-Bernhard B. <br...@ph...> - 2005-01-28 08:39:34
|
Daniel J Sebald wrote: [...] > I would too. However, might it be possible to use some simple > algorithm that does an OK job in most cases? I rather much doubt that such a thing exists. In contouring, I suspect most cases are too tricky for any simple algorithm. > The worst case scenario is when the contours are rather small oval > shapes, or rather close together. But if it is unacceptable to the > user, then he or she could turn off annotation. We really need better control than just on/off on this. > Rather than an optimization problem where we, say, pick a trajectory > with the smallest gradient (i.e., largest spacing between contours), > could we just pick some line for which to intersect as the spot to > pick the label text? (Intersecting with lines is a not so difficult > thing.) A line (without ends other than where it leaves the graph box) would not be a good idea. It has to be a line segment, and probably an optionally curved one at that. Which raises a serious problem about the command-line user interface we could provide to specify such a thing. > The contour plot algorithm apparently already knows how to create the > contours and whether they are lines or closed curves. So, if it is > a closed curve, pick the starting point or some other rule. If it's closed, it doesn't really have a starting point, does it? > If it is an open curve, take the line that bisects the endpoints and > find where that intersects the curve. No way. The number of intersections can easily be zero, or could be a dozen. Some other random points: *) I'm strictly against any GUI-only feature. Once we have a suitable command line method of specifying the locus of those contour labels, we can think of a mouse interaction method of doing the same. We may even have to keep in mind that a GUI should be possible while setting up the command line syntax. But command line is still *mandatory*. *) We're going to paint labels in the middle of the data area. I.e. we risk covering up critical aspects of the plotted data, which I consider a strict no-no. That's why a simple on/off control would be insufficient. We can't seriously expect users to accept that if the default placement puts on of a dozen labels in some undesirable place, their only option is to give up on in-graph contour labels altogether (or roll their own by plotting an extra file 'with labels') *) In-graph contour labelling must take into account whether a terminal can render rotated text or not. There will be a considerably large number of cases where horizontal-only labels are hard or impossible to place, while text oriented parallel to the contour line would still work. |