[Matplotlib-devel] Producing plots with objects

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Matplotlib-devel] Producing plots with objects

Tune Kamae

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 版のメールから送信

 


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: Producing plots with objects

Jody Klymak

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 版のメールから送信

 

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: Producing plots with objects

tcaswell

On Tue, Sep 26, 2017 at 2:16 PM Jody Klymak <[hidden email]> 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 版のメールから送信

 

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: Producing plots with objects

Benjamin Root
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 <[hidden email]> wrote:

On Tue, Sep 26, 2017 at 2:16 PM Jody Klymak <[hidden email]> 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 版のメールから送信

 

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel



_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: Producing plots with objects

Tune Kamae

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:[hidden email]]
Sent: Thursday, September 28, 2017 1:39 AM
To: Thomas Caswell <[hidden email]>
Cc: Jody Klymak <[hidden email]>; Tune Kamae <[hidden email]>; [hidden email]
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 <[hidden email]> wrote:

 

On Tue, Sep 26, 2017 at 2:16 PM Jody Klymak <[hidden email]> 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 版のメールから送信

 

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

 


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: Producing plots with objects

Benjamin Root
Tune,

If you are already working in the jupyter notebook and doing javascript, then you should look into utilizing jupyter widgets, which I think is javascript based and should integrate well with matplotlib. Jupyter widgets aren't covered in my book, though, and they are a bit of a moving target, API-wise.

Ben Root


On Thu, Sep 28, 2017 at 12:01 PM, <[hidden email]> wrote:

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:[hidden email]]
Sent: Thursday, September 28, 2017 1:39 AM
To: Thomas Caswell <[hidden email]>
Cc: Jody Klymak <[hidden email]>; Tune Kamae <[hidden email]>; [hidden email]
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 <[hidden email]> wrote:

 

On Tue, Sep 26, 2017 at 2:16 PM Jody Klymak <[hidden email]> 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 版のメールから送信

 

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

 



_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel