Content-Type: multipart/alternative; boundary=20cf301cc17ab43c0704a1758d2a
--20cf301cc17ab43c0704a1758d2a
Content-Type: text/plain; charset=ISO-8859-1
Hi Everyone,
I'm running into a problem with updating a plot that I've embedded into a Tk
application. I'm attaching the code with this email (so hopefully that will
show up at the end of the email). This is a very simple program, with one
canvas embedded into a window, with one menu and one button Tk widgets that
I'm using to select what plot type to display. The data are x, y, and t
variables, with x and y given by cos(2*pi*t) and sin(2*pi*t) respectively.
I'd like to be able to switch between a single scatter plot and two x(t) and
y(t) plots. The program "works" in that when you resize the window, the
plot updates, however, this really isn't ideal. I'd like the plot to
refresh when the button is clicked, and I can't seem to get it to work, nor
could I find support in previous email archives.
It seems like the trick used for animations, that is, only calling 'plot'
once and simply changing the xdata and ydata values of the line would speed
things up significantly, so I've implemented that in the code, but it
doesn't help.
Any help would be much appreciated! Thanks in advance.
Michael
--20cf301cc17ab43c0704a1758d2a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi Everyone,

I'm running into a problem with updating a plot tha=
t
I've embedded into a Tk application.=A0 I'm attaching the code wit=
h this=20
email (so hopefully that will show up at the end of the email).=A0 This is
a very simple program, with one canvas embedded into a window, with one
menu and one button Tk widgets that I'm using to select what plot type=
=20
to display.=A0 The data are x, y, and t variables, with x and y given by=20
cos(2*pi*t) and sin(2*pi*t) respectively.=A0 I'd like to be able to swi=
tch
between a single scatter plot and two x(t) and y(t) plots.=A0 The program
"works" in that when you resize the window, the plot updates, ho=
wever,=20
this really isn't ideal.=A0 I'd like the plot to refresh when the b=
utton=20
is clicked, and I can't seem to get it to work, nor could I find suppor=
t
in previous email archives.

It seems like the trick used for animations, that is, only calling=20
'plot' once and simply changing the xdata and ydata values of the l=
ine=20
would speed things up significantly, so I've implemented that in the=20
code, but it doesn't help.

Any help would be much appreciated!=A0 Thanks in advance.

Michae=
l

--20cf301cc17ab43c0704a1758d2a--