The new toolbar is great, and new button image too (is
> the background transparent, or not? If not and if it is
> possible, one minor cosmetic improvement would be to have
> transparent background button, they show lighter than my
> fltk buttons for now...Well, if it is not possible I
> guess I have to overide fltk default to use same color as
> the images background)
Can fltk use pngs? I just uploaded some pngs with transparent
backgrounds to CVS (revision 1.2)
> *As mentioned in by someone on the list previously, I
> think having button that indicate the status (like toggle
> button, or light button, or button that remains pushed)
> for Pan/Zoom and Zoom would be great. This way, one can
> return to arrow pointer and default (or user set
> callback)...For now this seems not possible (or maybe I
> did not find the way to do it?) In fltkagg I already put
> some light buttons for those, but this behavior is not
> activated in toolbar2 so there is not much point doing so
> for the moment
Indicating the button status via relief or whatever is nice, and this
is something that can be done on a backend basis. If you , Todd or
Steve have ideas on how best to do this for the respective backends,
go for it.
I updated the way the pointer setting calls in CVS. Now you only get
the special pointers when you are over an axes - otherwise you get the
arrow pointer. I did this by connecting to the motion_notify_event.
> *Having the motion_notify_event activated in toolbar 2 to
> activate Pan/zoom interactively seems a good idea
> (i.e. continous pan/zoom, rcord in the view stack on
> release). I can also draw a rectangle overlay when doing
> a zoom_to_rect in fltkagg, this will make selection
> easier (but I do not know if this is easy to do in other
I would like to have this on all the backends ideally. I could make a
call from the NavigationToolbar2 - set_zoom_overlay(xmin, xmax, ymin,
ymax) from the motion event. Would this help you? Todd , Steve, do
you know how to do this in your respective backends?
Theoretically, it could be done using matplotlib lines, but then the
canvas would have to be redrawn and reblitted dynamically and I don't
think the performance is good enough for that in most cases,
especially for Tk which is slow for this kind of thing. Is there a
native GUI solution for this on the respective backends?
> I'd like to investigate my "reverse"
> zoom_to_rect idea, maybe using right click = zoom out to
> rectangle/left click = zoom in to rectangle...this way
> with 2 buttons we have all navigation possibilities + a
> stack view, yay!!!
How is your "reverse zoom" idea different from the right click zoom
in/out with the hand/pan button (implemented in gtk and wx but not yet
in tk)? With that button activated, right click drag motions to the
left and down zoom out. And what should we call that button anyway?
Pan is not a good name since it pans and zooms.
> *Something that occur in both TkAgg, GTKAgg and FltkAgg
> (so it is in toolbar2 base class, I guess) is a
> non-conventional stack view behavior (I do not know if it
> is intended or not, so I will not scream bug! bug! too
> fast ): When we navigate with pan/zoom or
> zoom_to_rect, views are added in the stack, and one can
> go back and further with the previous/next arrows. But
> if one go back to arbitrary position in the stack (with
> back or home) and define a new view (pan/zoom again),
> this does not replace all the view further in the stack,
> but just add this view on top of the stack without
> removing any view (hum, this is not so easy to explain
> ). This is ok in itself, but I find it non-intuitive
> cause it does not correspond to a webbrowser or any
> undo/redo or back/previous scheme I have encountered
> before...So is this intentional?
No. I fixed it. When you get a new CVS checkout (there should be a
class Stack defined in backend_bases) make sure it works as expected.
Factoring the navigation stack into a dedicated class cleaned up the
NavigationToolbar2 base code considerably.
> Me too I'd like to go further though, I thing the
> multiple axes in toolbar1 was a great idea (so do you
> Tood, if you keep Axes menu in TkAgg toolbar 2 as a
> reminder of the feature...That's what I have done too in
> FltkAgg ) Something like a master/slave idea maybe?
> Axes defined as slave of another axe would reproduce the
> navigation done in the first one...or a bind notion: all
> the axes in the bind group react to navigation within any
> axe in the group...Well, these are possible stuff to do
> with command line, but a good idea to expose these in the
> toolbar remains to be found
I've thought about the master/slave idea before. There are a number
of examples when you want to bind one axes view lim to another. This
could be done with an observer pattern, where axes notify observers
when a view lim is set.
In code, you could call
But I don't know how this would best be handled in the GUI. Also,
more often than not you would want changes in ax1 to affect ax2 and
vice versa. Ie, not master-slave but bidirectionally coupled.