<div dir="ltr"><div><div><div><div><div>Tune,<br><br></div>That sounds like a fantastic project, and I absolutely *love* the idea! As a low-vision person myself, I understand the need for such applications. The last time I did anything like this for other visually-impaired students, I used foam pads and a mixture of sand and glue to teach students the shape of the letters of the alphabet by tracing their fingers along the rough parts of the foam pad. Luckily, the alphabet doesn't change, so I can just have a single set of them. But for mathematical formulas, you would certainly need something dynamic to help with exploration of the many kinds of mathematical formulas.<br><br></div>The basic idea here would be a program that would have a some plotted curve (fetched from the object returned by the call to `plt.plot()`), and a callback function attached to the 'button_press' event (assuming that is what a touchscreen reports screen touches as). In the callback function, you would have the x/y coordinates of the press event, and you would have the curve as a stored object (either as a global or some such). You would then calculate the distance between the x/y of the event, and the curve, and then activate a tone (I would assume python has some sort of sound-playing package somewhere). You can then deactivate the tone on the 'button_release' event (a second callback). There is also a 'mouse_move' event, if I remember correctly, so you can update the tone as the finger drags along the screen.<br><br></div>Let me know if you have more questions!<br><br></div>Cheers!<br></div>Ben Root<br><br><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 27, 2017 at 1:11 AM, Thomas Caswell <span dir="ltr"><<a href="mailto:tcaswell@gmail.com" target="_blank">tcaswell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ben Root wrote a book on interactive figures <a href="https://www.amazon.com/Interactive-Applications-using-Matplotlib-Benjamin/dp/1783988843" target="_blank">https://www.amazon.com/<wbr>Interactive-Applications-<wbr>using-Matplotlib-Benjamin/dp/<wbr>1783988843</a><div><br></div><div>Also see the 03 tutorial on picking in <a href="https://github.com/tacaswell/interactive_mpl_tutorial" target="_blank">https://github.com/<wbr>tacaswell/interactive_mpl_<wbr>tutorial</a></div><div><br></div><div>Tom</div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 26, 2017 at 2:16 PM Jody Klymak <<a href="mailto:jklymak@uvic.ca" target="_blank">jklymak@uvic.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>




<div>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">Sure you can do this, plus or minus the Windows 10 interaction which I know nothing about.  Once you figure to how to plot what you want, have a look at:</p>

<p dir="auto"><a href="https://matplotlib.org/users/event_handling.html" target="_blank">https://matplotlib.org/users/<wbr>event_handling.html</a></p>

<p dir="auto">to see how to make the plot respond to <code>button_press_event</code> or <code>motion_notify_event</code>.</p>

<p dir="auto">Cheers,   Jody</p></div></div></div><div><div style="font-family:sans-serif"><div style="white-space:normal">

<p dir="auto">On 25 Sep 2017, at 2:40, Tune Kamae wrote:</p>

</div></div></div><div><div style="font-family:sans-serif">
<div style="white-space:normal"></div>
<blockquote style="border-left:2px solid #5855d5;color:#5855d5;margin:0 0 5px;padding-left:5px"><div id="m_-4326134252488897046m_-65780502287528387805A5FFE44-0619-442B-A024-028DC8684D2D"><div link="blue" vlink="#954F72" lang="JA"><div><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">Hi,</span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US"> </span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">My knowledge on matplotlib is limited and may be using wrong terminology.</span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">However my goal is quite clear. What I don’t know is where to post my question.</span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">If this is not the right mailing list, please forgive me and suggest the right mailing list.</span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US"> </span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">My goal:</span></p><ol style="margin-bottom:0;margin-top:0" start="1" type="1"><li style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin-bottom:0.0001pt;margin-right:0;margin-top:0;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">Make a plot with all elements accessible as objects like the one Excel produces.</span><span style="font-size:12.0pt" lang="EN-US"></span></li><li style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin-bottom:0.0001pt;margin-right:0;margin-top:0;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">Then by touching anywhere on screen (assuming Win10 with a touch screen), one will know how close is the touch location to a curve or the x-axis.</span><span style="font-size:12.0pt" lang="EN-US"></span></li><li style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin-bottom:0.0001pt;margin-right:0;margin-top:0;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">If such a plot can be put out, I can program for the blind students follow a line by producing sound.</span><span style="font-size:12.0pt" lang="EN-US"></span></li><li style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin-bottom:0.0001pt;margin-right:0;margin-top:0;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">They can follow any one of multiple curves in a plot and can feel what a sinusoidal curve is.</span><span style="font-size:12.0pt" lang="EN-US"></span></li></ol><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin-bottom:0.0001pt;margin-left:18pt;margin-right:0;margin-top:0;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US"> </span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin-bottom:0.0001pt;margin-left:18pt;margin-right:0;margin-top:0;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">I would greatly appreciate if someone can guide me along this direction.</span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin-bottom:0.0001pt;margin-left:18pt;margin-right:0;margin-top:0;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US"> </span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin-bottom:0.0001pt;margin-left:18pt;margin-right:0;margin-top:0;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">Tune Kamae</span><span style="font-size:12.0pt" lang="EN-US"></span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US"> </span></p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span lang="EN-US">Windows 10 </span>版の<span lang="EN-US"><a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank"><span lang="EN-US"><span lang="EN-US">メール</span></span></a></span>から送信</p><p style="font-family:"\006e38\0030b4\0030b7\0030c3\0030af",sans-serif;font-size:10.5pt;margin:0;margin-bottom:0.0001pt;text-align:justify;text-justify:inter-ideograph" align="justify"><span style="font-size:12.0pt;font-family:"\00ff2d\00ff33  \00ff30\0030b4\0030b7\0030c3\0030af",sans-serif" lang="EN-US"> </span></p></div></div></div></blockquote>
<div style="white-space:normal">
<blockquote style="border-left:2px solid #5855d5;color:#5855d5;margin:0 0 5px;padding-left:5px">
</blockquote><blockquote style="border-left:2px solid #5855d5;color:#5855d5;margin:0 0 5px;padding-left:5px"><p dir="auto">______________________________<wbr>_________________<br>
Matplotlib-devel mailing list<br>
<a href="mailto:Matplotlib-devel@python.org" target="_blank">Matplotlib-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/matplotlib-<wbr>devel</a></p>
</blockquote></div>
<div style="white-space:normal">
</div>
</div></div>

______________________________<wbr>_________________<br>
Matplotlib-devel mailing list<br>
<a href="mailto:Matplotlib-devel@python.org" target="_blank">Matplotlib-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/matplotlib-<wbr>devel</a><br>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
Matplotlib-devel mailing list<br>
<a href="mailto:Matplotlib-devel@python.org">Matplotlib-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/matplotlib-<wbr>devel</a><br>
<br></blockquote></div><br></div>