On Tue, Nov 13, 2012 at 8:38 AM, David Brunell <quantal...@gmail.com> wrote:
> Hello, I have what I hope is a simple question. When producing a
> figure/plot, I have a window which pops up with the figure inside and a few
> tool buttons along the bottom, including "Zoom to rectangle." Clicking the
> Zoom tool button, I'm presented with a black crosshair to select my zoom
> rectangle. Many of the images I work with are predominantly black; is
> there any way to change the color of the crosshair so as to make it more
> visible? Thanks.
Hi David,
Unfortunately, those widgets are backend specific, so changing them is not
trivial in general, since each toolkit has its own way of specifying the
cursor. With that said, you can try to figure out if there's a way to do it
for your backend `import matplotlib as mpl; mpl.get_backend()` will tell
you which backend you're using, and then you'll need to look in the
relevant source code for where the cursor is define.
If you don't know where your matplotlib code lives, you can the path of the
relevant files using this:
import matplotlib.backends as b
import os
os.path.dirname(b.__file__)
There, you'll find files for all of the backends, and the `cursord`
dictionary in most of them is what specifies how the widgets look. I'm not
sure which toolkits allow one to change the color of the default cursors,
but some of them allow you to even specify your own color images, so it
should be possible.
An alternative, of course, would be to change the colormap you're plotting
with, or add an alpha value to the images you're plotting so that the black
widgets can be seen. Maybe it's inelegant, but looks like the path of least
resistance...
best,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users