1
$\begingroup$

Suppose that I have plotted many figures and have exported them as images. Now for the post-processing phase, I would like to import these figures and manipulate them in such a way that a slider assists me to view them together. The plots are produced by changing just one parameter. Thus I would like to put the name of this parameter on the slide as well as its range. Does anyone have experience for such manipulation?

Thanks in advance

$\endgroup$

1 Answer 1

2
$\begingroup$

First I will create some files to reproduce what you have

SetDirectory[$TemporaryDirectory]; SetDirectory@CreateDirectory["TestPictures"]; *) Export[ StringJoin[ #[[2]] , ".png" ] , ImageResize[ ExampleData[#] , 100 ] ] & /@ Take[ ExampleData["TestImage"] , 5 ] 

Now we can use the Slider in Manipulate.

With[{picturefiles = FileNames["*.png"]}, Manipulate[ Column[ { picturefiles[[k]], Import[picturefiles[[k]]] } ] , {{k,1,"Index"}, 1, Length[picturefiles], 1} ] ] 

enter image description here

Without Slider but SetterBar, in this case better.

With[{picturefiles = FileNames["*.png"]}, Manipulate[ Import[k] , {{k, picturefiles[[1]], "File"}, picturefiles, SetterBar, Appearance -> "Vertical"} ]] 

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks for your answer. Is it possible to change the name of the slider and also show its range on the slider? $\endgroup$ Commented Jun 2, 2018 at 9:52

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.