Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Dynamically generating Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87573] Dynamically generating Manipulate
  • From: Yaroslav Bulatov <yaroslavvb at gmail.com>
  • Date: Sun, 13 Apr 2008 03:33:08 -0400 (EDT)

I'm looking to make something like below, except that I want the
Manipulate section to construct it's controls from "mystocks" list
dynamically.  What is the easiest way to achieve this?

mystocks = {"CHYIX", "OREAX", "IGNBX","ZEUS"};
doit[stocks_] := (
   poses = Position[stocks, True] // Flatten;
   DateListPlot[
    FinancialData[mystocks[[#]], "Jan. 1,2000"] & /@ poses]
   );
Manipulate[doit[{s1, s2, s3}],
 {{s1, True}, {True, False},
  ControlPlacement -> Bottom}, {{s2, False}, {True, False},
  ControlPlacement -> Bottom}, {{s3, False}, {True, False},
  ControlPlacement -> Bottom}]


  • Prev by Date: List concatenation speed
  • Next by Date: Possible bug in WAV export
  • Previous by thread: Re: List concatenation speed
  • Next by thread: Re: Dynamically generating Manipulate