Eric Firing wrote: > Mike, > > A bug was recently pointed out: axhline, axvline, axhspan, axvspan > mess up the ax.dataLim. I committed a quick fix for axhline and > axvline, but I don't think that what I did is a good solution, so > before doing anything for axhspan and axvspan I want to arrive at a > better strategy. > > What is needed is a clean way to specify that only the x or the y part > of ax.dataLim be updated when a line or patch (or potentially anything > else) is added. This is specifically for the case, as in *line, where > one axis is in data coordinates and the other is in normalized > coordinates--we don't want the latter to have any effect on the dataLim. > > This could be done in python in any of a variety of ways, but I > suspect that to be most consistent with the way the transforms code is > now written, relying on update_path_extends from _path.cpp, it might > make sense to append two boolean arguments to that cpp function, > "update_x" and "update_y", and use kwargs in Bbox.update_from_path and > siblings to set these, with default values of True. It seems we could do this without touching C at all. Just change update_from_path so it only updates certain coordinates in the bounding box based on the kwargs you propose. Sure, the C side will be keeping track of y bounds even when it doesn't have to, but I doubt that matters much compared to checking a flag in the inner loop. It will compute the bezier curves for both x and y anyway (without digging into Agg). It's hard to really estimate the performance impact, so I'm necessarily pushing for either option, but it may save having to update the C. > What do you think? If you agree to the _path.cpp change strategy, do > you prefer to do that yourself, or would you rather that I try it first? I probably won't have a chance to look at this today, so go ahead if you like. I'll shoot you a note later in the week if I have time...
Cheers, Mike > > Any suggestions and/or contributions are welcome. > > Thanks. > > Eric -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel