>>>>> "John" == John Pye <[EMAIL PROTECTED]> writes:
John> Hi all I have an application that uses Matplotlib to display
John> incidence matrices for systems of equations. I have linked
John> up the figure window with 'event handling' so that mouseover
John> on the plot shows the variables/relations corresponding to
John> the pointed-to coordinates, but at present this is only
John> output to the console, as per the example in the User's
John> Guide.
John> I'd like to switch it over so that the variable and relation
John> name replaces the 'x=' and 'y=' text in the bottom-left of
John> the Figure window.
John> Is there anything in the event handling mechanism that would
John> facilitate me doing this? Is there a way I can do this
John> without having to patch matplotlib? It seems like this would
John> be a generally useful addition to the event handling stuff
John> for figure windows.
The Axes class has two attributes, fmt_xdata and fmt_ydata, which if
defined are callables that take the x and y coords as floats and
return the format string used to format that bit of text that goes
into the toolbar. The default is to use the xaxis and yaxis
Formatters. See examples/date_demo1.py for some example code.
JDH
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users