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


Groups > comp.soft-sys.math.mathematica > #8956

Re: Listplot with appendto list

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Listplot with appendto list
Date 2012-03-11 09:06 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jjhptt$ish$1@smc.vnet.net> (permalink)
References <201203101115.GAA08109@smc.vnet.net>

Show all headers | View raw


Create the list and then operate on the list. I've added a slope control.

Manipulate[
 list = a*Range[0, n];
 ListLinePlot[list,
  PlotRange -> {{-0.01, 10}, {-0.01, 4}}],
 {{a, 0.2}, 0.1, 0.5, 0.1, Appearance -> "Labeled"},
 {{n, 1, "N"}, 1, 10, 1, Appearance -> "Labeled"}]


Bob Hanlon

On Sat, Mar 10, 2012 at 6:15 AM, Scott Colwell <srcolwell@gmail.com> wrote:
> I have slider that control a variable (N) that is used in a calculation. Suppose the calculation is .2 x N. I want to have the answer at each level of N to be added to a list. The list is then plotted using ListPlot using the Joined -> True so that it updates at each level of N.
>
> I've tried reap and so and AppendTo, but can't seem to get it to work. Any thoughts?
>
> Here's what I have so far:
>
> Manipulate[
>  list = {0};
>  Show[
>  ListPlot[
>   AppendTo[list, .1*n],
>   Joined -> True,
>   PlotRange -> {{-0.01, 10}, {-0.01, 1}}
>   ]],
>  {{n, 1,  "N"}, 1, 10, 1}
>  ]

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Listplot with appendto list Bob Hanlon <hanlonr357@gmail.com> - 2012-03-11 09:06 +0000

csiph-web