This creates a manipulate object show two static plots,

pic1 = Plot[Sin[x], {x, 0, Pi}];
pic2 = Plot[Cos[x], {x, 0, Pi}];
CloudDeploy[Manipulate[pic, {pic, {pic1 -> "sine", pic2 -> "cosine"}}]]

enter image description here

Is it possible to replace the static images above with gif animations, so that it shows different gif animations as I select different buttons?

For example, I tried something like

pic1 = Table[Plot[Sin[n x], {x, 0, Pi}], {n, 0, 2, 0.1}];
pic2 = Table[Plot[Cos[n x], {x, 0, Pi}], {n, 0, 2, 0.1}];

CloudDeploy[Manipulate[ExportForm[pic, "gif"], {pic, {pic1 -> "sine", pic2 -> "cosine"}}]]

but it doesn't work. This is what I get from the cloud

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.