It's likely that this is just a general Python Tkinter question, not necessarily a matplotlib one.
So I'm in the midst of developing a rather large suite of plotting functionality on top of matplotlib using the Matplotlib "TkAgg" backend (Agg rendering to a Tk canvas using TkInter). I'm using some of the default zooming functionality provided by matplotlib out of the box...specifically the "Zoom to box" button on the default matplotlib toolbar. I am creating my own toolbar by subclassing the existing "matplotlib.backends.backend_tkagg.NavigationToolbar2TkAgg" class.
Pretty much, the issue here is that I hate the default icon that "Zoom to box" uses (the Tkinter "tcross"). I've figured out how to use a different Tkinter built-in cursor (e.g. this changes the cursor to "plus" instead of "tcross"):
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.backend_bases
import matplotlib.backends.backend_tk_agg
matplotlib.backends.backend_tkagg.cursord[matplotlib.backend_bases.cursors.SELECT_REGION] = "plus"
And in general, I know that to change the current mouse cursor to one of the built-in Tkinter ones from the toolbar class, I can just call:
self.window.configure(cursor="cursor_name")
So what I would really, really like is to be able to use a magnifying glass icon for when the user is in "zoom mode". I already have a .ppm of the magnifying glass icon I'd like to use and everything, but I can't figure out for the life of me how to use my magnifying glass as the mouse cursor icon. Is it possible to use a custom image as a mouse cursor in Python Tkinter? Help!
Platform note: This needs to be workable on Mac OS X 10.5+, RedHat Enterprise Linux 5, and possibly Solaris 10, so a platform-specific solution is undesirable.