Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Reset Button to Clear ListPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125403] Re: Reset Button to Clear ListPlot
  • From: Scott Colwell <scolwell at uoguelph.ca>
  • Date: Mon, 12 Mar 2012 04:08:32 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

We that was easy. LOL  I guess that's what happens when you're working too late at night on these things.

Thank you Adriano!!

----- Original Message -----
From: "Adriano Pascoletti" <adriano.pascoletti at uniud.it>
To: mathgroup at smc.vnet.net
Cc: "Scott Colwell" <scolwell at uoguelph.ca>
Sent: Sunday, 11 March, 2012 5:31:48 AM
Subject: [mg125403] Re: Reset Button to Clear ListPlot



Button["Reset", a = {0}]? 




Adriano Pascoletti 




2012/3/11 Scott Colwell < scolwell at uoguelph.ca > 


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. 

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

Thank you, 

-- 
Scott R. Colwell, Ph.D.
Associate Professor, Dept. of Mkt/Cons Studies
Adjunct Professor, Dept. of Psychology
MINS Building 201a
University of Guelph
Guelph, Ontario, Canada, N1G 2W1



  • Prev by Date: pole/zero plot for TransferFunctionModel in the control system package?
  • Next by Date: Re: Dynamically create Select criteria
  • Previous by thread: Re: Reset Button to Clear ListPlot
  • Next by thread: More general idea re operators