Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have 3 lists of plots (generated in other code), rawplots, weightplots,linearizedplots.

Each list of plots is the same length, and I wanted to use Manipulate to access one plot at a time. I attempted to use the following:

Manipulate[plot[[n]], {plot, {rawplots, weightplots,linearizedplots}, PopupMenu}, {n, 1, Length@files, 1,RadioButtonBar}]

This works, but in the Popup Menu I have plots. I would like to instead have words in the popup menu.

Additionally, I have a variable files which is a list of filenames. Ideally, I would like to have the radio buttons named files[[n]], i.e. the file name from the variable files.

Thanks!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Use value -> label in the list of values:

Manipulate[
    plot[[n]],
    {plot, {rawplots -> "foo", weightplots -> "bar", linearizedplots -> "baz"}, PopupMenu}
]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.