MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Reset Button to Clear ListPlot

  • To: mathgroup at
  • Subject: [mg125385] Reset Button to Clear ListPlot
  • From: Scott Colwell <scolwell at>
  • Date: Sun, 11 Mar 2012 04:06:45 -0500 (EST)
  • Delivered-to:

Does anyone know how to create a "Reset" button that will clear a ListPlot (ie: clear off the data that is plotted) but leave the Plot axes and ticks there so that it can be started again.

Here's what I have. Basically I need to be able to clear the graph.

 ListPlot[a, Joined -> True],
 Button["Add Random", AppendTo[a, RandomInteger[{1, 6}]]], {{a, {0}}, 
  ControlType -> None},
 Button["Reset", Clear[a]]]

Thank you,

  • Prev by Date: Re: Real time sound processing?
  • Next by Date: More general idea re operators
  • Previous by thread: Re: Textures with AlphaChannel not working on OS X
  • Next by thread: Re: Reset Button to Clear ListPlot