I have imported data for several projects {prj1, prj2, ...} from an excel file, in form of {x,y} coordinates of points. I stored these data in variables and I would like to plot them, also having the possibility to "turn on" or "turn off" some of the projects, so to selectively display different projects. I don't seem to get it work and this is what I've done until now:
prj1 = Import[ExcelFile, {"Data", 5, Table[i, {i, 4, 24}], {1, 2}}];
...
Manipulate[ListPlot[{prj1, prj2, prj3}],
{prj1, {0, 1}, Checkbox},{prj2, {0, 2}, Checkbox},{prj3, {0, 3}, Checkbox}]
I suspect there is a syntax error, but I need your help to find it...
Thanks in advance.
Conrad
Answer
The first answer to the possible duplicate doesn't seem to work under version 10.1. Therefore here is some similar code, that does work:
prjs = {prj1, prj2, prj3} = RandomReal[#, 100] & /@ {1, 2, 3};
Manipulate[ListPlot[prjs[[projectNo]], Joined -> True],
{{projectNo, {1}}, Range[Length@prjs], ControlType -> CheckboxBar}]
Comments
Post a Comment