Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8974 > unrolled thread

Re: Reset Button to Clear ListPlot

Started byScott Colwell <scolwell@uoguelph.ca>
First post2012-03-12 09:10 +0000
Last post2012-03-12 09:10 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Reset Button to Clear ListPlot Scott Colwell <scolwell@uoguelph.ca> - 2012-03-12 09:10 +0000

#8974 — Re: Reset Button to Clear ListPlot

FromScott Colwell <scolwell@uoguelph.ca>
Date2012-03-12 09:10 +0000
SubjectRe: Reset Button to Clear ListPlot
Message-ID<jjkeib$1bn$1@smc.vnet.net>
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@uniud.it>
Cc: "Scott Colwell" <scolwell@uoguelph.ca>
Sent: Sunday, 11 March, 2012 5:31:48 AM
Subject: Re: Reset Button to Clear ListPlot



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




Adriano Pascoletti 




2012/3/11 Scott Colwell < scolwell@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

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web