[Matplotlib-devel] Producing plots with objects
tune.kamae at gmail.com
tune.kamae at gmail.com
Thu Sep 28 12:01:57 EDT 2017
Ben and other developers
I confirmed that the interactive Matplotlib has most basic functions I need. I wrote a simple javascript to speak English or Japanese and also to recognize voice like x-axis, y-axis, line-1 etc. I haven’t written code to make beep sounds changing volume and tone.
With my limited knowledge, I couldn’t figure out mixing javascript with python in a same Jupyter cell. So I have been thinking to use the execjs package and define functions for TTS and voice recognition. Then I can call these functions from python.
Once I understand these basic strategy I would like to find a coding pro and ask to make a prototype package.
Meantime I am exploring some way to voice Jupyter Notebook. The easiest way for me is to convert the notebook to an html in which links are made to individual cells. If there is a way to set Jupyter ignore <a href …>, my scheme may work.
Thank you for assistance.
Tune Kamae
From: Benjamin Root [mailto:ben.v.root at gmail.com]
Sent: Thursday, September 28, 2017 1:39 AM
To: Thomas Caswell <tcaswell at gmail.com>
Cc: Jody Klymak <jklymak at uvic.ca>; Tune Kamae <tune.kamae at gmail.com>; matplotlib-devel at python.org
Subject: Re: [Matplotlib-devel] Producing plots with objects
Tune,
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.
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.
Let me know if you have more questions!
Cheers!
Ben Root
On Wed, Sep 27, 2017 at 1:11 AM, Thomas Caswell <tcaswell at gmail.com <mailto:tcaswell at gmail.com> > wrote:
Ben Root wrote a book on interactive figures https://www.amazon.com/Interactive-Applications-using-Matplotlib-Benjamin/dp/1783988843
Also see the 03 tutorial on picking in https://github.com/tacaswell/interactive_mpl_tutorial
Tom
On Tue, Sep 26, 2017 at 2:16 PM Jody Klymak <jklymak at uvic.ca <mailto:jklymak at uvic.ca> > wrote:
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:
https://matplotlib.org/users/event_handling.html
to see how to make the plot respond to button_press_event or motion_notify_event.
Cheers, Jody
On 25 Sep 2017, at 2:40, Tune Kamae wrote:
Hi,
My knowledge on matplotlib is limited and may be using wrong terminology.
However my goal is quite clear. What I don’t know is where to post my question.
If this is not the right mailing list, please forgive me and suggest the right mailing list.
My goal:
1. Make a plot with all elements accessible as objects like the one Excel produces.
2. 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.
3. If such a plot can be put out, I can program for the blind students follow a line by producing sound.
4. They can follow any one of multiple curves in a plot and can feel what a sinusoidal curve is.
I would greatly appreciate if someone can guide me along this direction.
Tune Kamae
Windows 10 版の <https://go.microsoft.com/fwlink/?LinkId=550986> メールから送信
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org <mailto:Matplotlib-devel at python.org>
https://mail.python.org/mailman/listinfo/matplotlib-devel
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org <mailto:Matplotlib-devel at python.org>
https://mail.python.org/mailman/listinfo/matplotlib-devel
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org <mailto:Matplotlib-devel at python.org>
https://mail.python.org/mailman/listinfo/matplotlib-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170929/8bc6dfee/attachment-0001.html>
More information about the Matplotlib-devel
mailing list