Plotting in nested Manipulates
- To: mathgroup at smc.vnet.net
- Subject: [mg124555] Plotting in nested Manipulates
- From: Chris Young <cy56 at comcast.net>
- Date: Tue, 24 Jan 2012 05:10:12 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
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 at comcast.net