[R] Altering domain & range in an interactive plot using tcl/tk

Pete Cap peteoutside at yahoo.com
Tue Oct 18 22:09:38 CEST 2005


List,

I am trying to create a simulated spectrum analyzer in
R.  The user gets as output a power spectrum (plot of
power vs. time).

I want the user to be able to change the center
frequency (midpoint between xMin and xMax) and window
size (distance from xMin to xMax) using sliders in
tkrplot.  This will allow the user to scroll left and
right and "zoom" in and out.

I can get the sliders to appear just fine.  If I
manipulate the sliders, then drop from the plot window
back down to the interactive prompt and call
tkrreplot, then plot updates.  How can I get this to
happen automatically (e.g. every time you move the
slider, the plot updates)?

Thanks in advance,
Pete

PS: If anyone has any tips on the UI please feel free
to offer those as well.




More information about the R-help mailing list