Re: Dynamically create array and display data graphically
- To: mathgroup at smc.vnet.net
- Subject: [mg102515] Re: [mg102497] Dynamically create array and display data graphically
- From: Jaebum Jung <jaebum at wolfram.com>
- Date: Wed, 12 Aug 2009 04:33:24 -0400 (EDT)
- References: <200908110805.EAA22070@smc.vnet.net>
Do you mean like this?
Manipulate[Manipulate[DateListPlot[Transpose[Take[b,{2,p}][[All,1;;a]]],{{2009,7,8},Automatic,"Day"},Joined->True],{p,2,35,1}],{a,2,5,1}]
- Jaebum
Tuhina Singh wrote:
> Hi,
> Please bear with me if you find this a simplistic problem. Just learning to find my way around mathematica.
>
> b = Import["C:\Practice\example1.xls",{"Data",1}] (* Import file - several columns of data with first row having headers *)
>
> Manipulate[Manipulate[DateListPLot[{Take[b,{2,p}][[All,a]]}, {{2009,7,8},Automatic,"Day"},Joined->True],{p,2,35,1}],{a,2,5,1}]
>
> In this code, I am able to specify the column I want displayed using the outer manipulate fn, and the inner manipulate function changes the number of rows of data displayed.
>
> Now I want to change this function so that the outer manipulate fn specifies the "number of columns" to be displayed. So that if a = 3, I see three series in the graph with "p" rows of data shown in the graph.
>
> I tried the following with no success:
>
> Manipulate[{Do[col[[x]]= DateListPLot[{Take[b,{2,35}][[All,x]]}, {{2009,7,8},Automatic,"Day"},Joined->True, DisplayFunction->Identity],{x,2,a,1}],
> Do[Show[col[[x]], DisplayFunction->$DisplayFunction],{x,2,a,1}]}, ,{a,2,5,1}]
>
> Was basically trying to loop "a" times to dynamically create an array of dimension [a, 35] and then display them all together using Show function. But value of "a" doesn't get passed on and I believe use of the Do loop is also wrong here.
>
>
> Thanks for ur help.
>
> Regards,
> Tuhina
> ________________________________
> Tuhina Singh
> Siddhesh Capital Market Services Pvt Ltd.
> 122, Maker Chambers III, 12th Floor
> Nariman POint
> Mumbai - 400 021
>
> Tel (D): 91-22-4057 0322
> (B): 91-22-4057 0300
> Fax: 91-22-2285 2912
>
>
- References:
- Dynamically create array and display data graphically
- From: Tuhina Singh <tuhina.singh@rmilindia.com>
- Dynamically create array and display data graphically