matplotlib button problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zielinski

    #1

    matplotlib button problem

    Hi,

    Recently I started to use matplotlib with python. Now I would like to
    have interaction with my plots. Here is the problem:

    I have a long vector of data, to long to display it on one picture,
    because of, well you know to much data to big mess... so I decided to
    extract some data from long_vector to short_vector with 100 elements.
    So I have:
    data_position = 1
    interval = 100
    for i in range (0, interval):
    short_vector[i] = long_vector[data_position*i nterval + i]

    Then I plot it. works fine...
    Now I created a button "next" I would like to press it and change the
    data_position to +1 every time i press it, of course, and redraw the
    picture. It can be a key on the keyboard, I don't care.

    Bottom line: how to change the global variable with the button in
    matplotlib, and redraw a picture using this variable

    Thanks for help
    Jerzy
    jerzy.zielinski @gmail.com

Working...