Hi Egor -- thanks for the update. For future posts on the same theme, could you please respond to the existing thread rather than creating a new one. This makes it easier for people who are following a thread to keep following it, and those ignoring it to keep ignoring it. Importantly, for future generations of googlers and nabblers, it makes it easier to follow a single conversation. If you feel like you earlier post fell on deaf ears because you got no response, its more likely that we fell behind than that we didn't see it, because all of us have threaded news readers. Just "bump" the thread with a polite and gentle "did anyone have a chance to test this?" rather than creating a new thread....
Comments on the patch inline below. On Fri, Nov 28, 2008 at 8:19 AM, Egor Zindy <[EMAIL PROTECTED]> wrote: > A few things I added this time round: > * showrange keyword (as per John's suggestion) > * push keyword This is a nice enhancement -- could you also add a keyword arg so users can customize the min/max of the span. You've hardcoded [0.99...1], which may be a little tight for some users. Also, it prevents being able to place one span on left, one on right, for multiple bars, etc.. Something like rangelim=[0.99, 1.0] as a kwarg should be fine. > New problems: > * Not sure how to make an axvspan / axhspan span from -inf to value or value > to +inf. I use None in my valrange keyword to indicate that but using None > as an argument in axvspan doesn't help much... This is a bit tricky. Probably the best way to do it is to connect to the xlim_changed and ylim_changed events of the Axes, and update the bar line to encompass the current view limits. > * My push keyword kind of works now (see the example, green line can push > the blue line) but the implementation is a real mess. I might have to > rewrite the blitting (I need a background image with none of the bars so > that I can use that for blitting). I am not seeing any effect of push when I push the green line over to blue in your example; not exactly sure what is supposed to happen. If you set the animated property on all the bar lines, none of them will be rendered on a normal draw, which may help you control the blitting. > Other problems (in my previous posts) still stand: > * there is a toobar.set_cursor() but no toolbar.get_cursor() which would be > interesting to have to set the cursor back to what it should be (rather than > arbitrary POINTER type). You can add a get_cursor method in your next patch -- see below :-) > * more cursor types would be nice (could do with size_ver and size_hor in > http://wiki.openusability.org/guidelines/index.php/Design_and_Layout:Visual_Design:Cursors). > * took a long time to check out matplotlib from SVN, have yet to check the > new events out. I would be happy to accept as many cursor types as you want to add. The trick is that we need to support them across the 4 major user interfaces (tk, wx, gtk, qt). So we shouldn't go crazy with lots of cursor types that we can't support across backends. If you would like to patch backed_bases and one or more of the other user interface backends, we can extend the number of cursors we support. http://wxpython.org/docs/api/wx.Cursor-class.html http://www.pygtk.org/docs/pygtk/class-gdkcursor.html http://doc.trolltech.com/4.4/qcursor.html http://www.tcl.tk/man/tcl8.4/TkCmd/cursors.htm We don't have to support the least common denominator of all these, but it would be nice to support all the cursors that all support, and maybe a few more that one or more don't support but can use a reasonable proxy for. If you are interested in adding support for this in your next patch, that would be great. > * a nice name? (been struggling with that a lot lately!) Is "Bar" OK? or > maybe "SelectionBar"? I am not wild about Bar either -- how about ScalarSelector, which is a fits in fairly well with the existing SpanSelector... When you are ready to submit something for inclusion in mpl, please get a fresh svn checkout (slow or not) and submit a svn diff -- see http://matplotlib.sourceforge.net/faq/howto_faq.html#contributing-howto JDH ------------------------------------------------------------------------- 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