[Matplotlib-devel] feature request
tune.kamae at gmail.com
tune.kamae at gmail.com
Mon Oct 2 04:20:38 EDT 2017
Dear Developers,
I have been developing sound-guided matplotlib to assist blind students to trace curves on the 2D plots.
I figured out to implement what I want for plotted curves but still struggling to enable tracing the x and y axes. The sample plot I am working with is Axes.pickable. What I cannot figure out is to get majoraxislabels when a finger-touch event occurs within a fixed distance, eg. Picker=5 of x-axis.
First I have to figure out if the event is onaxes. I am using what I found in Matplotlib tutorials. How should I modified the codes below?
def onpick(event):
thisline = event.artist
xdata = thisline.get_xdata()
ydata = thisline.get_ydata()
ind = event.ind
points = tuple(zip(xdata[ind], ydata[ind]))
print('onpick points:', points)
if onpick:
print ("Data points picked")
winsound.Beep(Freq,Dur)
Thank you for the assistance,
Tune Kamae
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20171002/c2218949/attachment.html>
More information about the Matplotlib-devel
mailing list