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


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

Plotting in nested Manipulates

From Chris Young <cy56@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Plotting in nested Manipulates
Date 2012-01-24 10:13 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jfm07i$jtb$1@smc.vnet.net> (permalink)

Show all headers | View raw


I can get this to work:

Clear[c];

Manipulate[
 With[
  {
   values = Table[c[i], {i, 1, n}],
   controls = Sequence @@ Table[{{c[i], 0.5}, 0, 1, 0.1}, {i, 1, n}]
   },
 
  Manipulate[
   Column[{values, ListLinePlot[Evaluate @ values]}],
   controls
   ]
 
  ],
 {n, 4, 10, 1}
 ]

But when I try to put the plot into the "values" variable, nothing happens.

Clear[c];

Manipulate[
 With[
  {
   contents =
    With[{values = Table[c[i], {i, 1, n}]},
     Column[{values, ListLinePlot[Evaluate @ values]}]
     ],
  
   controls = Sequence @@ Table[{{c[i], i * 0.1}, 0, 1, 0.1}, {i, 1, n}]
   },
 
  Manipulate[
   contents,
   controls
   ]
 
  ],
 {n, 4, 10, 1}
 ]


Is "With" the wrong thing to use for this?  I didn't have any better
luck with Module.

Chris Young
cy56@comcast.net

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


Thread

Plotting in nested Manipulates Chris Young <cy56@comcast.net> - 2012-01-24 10:13 +0000
  Re: Plotting in nested Manipulates A Retey <awnl@gmx-topmail.de> - 2012-01-25 12:15 +0000
    Re: Plotting in nested Manipulates Chris Young <cy56@comcast.net> - 2012-01-27 11:14 +0000

csiph-web