From: Michael SCHINDLER <mschindler@us...>  20070806 12:49:11

Salut André, On 06.08.07, Andre Wobst wrote: > On 24.07.07, Michael SCHINDLER wrote: > > as you are currently working at the graph module, I would like to make > > a suggestion: I often encounter the problem that an axis partitioning > > fails (in ydirection) because I am plotting a constant function. As > > this occurs when I want to look at some data a script produced, this > > is extremely inconvenient. > > > > What about indroducing another parameter for the axis, some "minmal" > > data range  just to make the runs more stable and one does not have > > to worry about constant data all the time? > > I still don't know what to do. It's not the first time somebody > complains (and thus maybe I should stop ignoring this completely), but > I still don't know how to do better. Technically it's not complicated. > But what's a reasonable minimal axis range. 1e10??? Should we really > introduce such a "feature"? It looks too application depended to me. Yes, we should. I see your objection with the value of the "minimal range". The answer is quite simple: There is no "reasonable" default value. You cannot take the range of the xaxis, as you do not know if the x and ydata have something to do with each other. You cannot fix an abitrary reasonable value either. > I would like to have a solution *independed* of the data you pass to > the graph. But I really don't see how this could be done ... But, what about the following: Set the "minimal axis range" to "None" by default and let the code crash at this point exactly as it does now. If someone wants to avoid this "crashing" in a semiautomated environment (someone like me), then he can set this value to something reasonable. With this solution, it is the user who has the responsability to find a reasonable value. Michael. 