Message Boards Message Boards

2
|
5637 Views
|
2 Replies
|
5 Total Likes
View groups...
Share
Share this post:

How can I generate function plots with CloudDeploy and FormFunction?

Posted 10 years ago

Very simple example:

CloudDeploy[FormFunction[{"first"->"Number","second"->"Number"}, Plot[1+3*x,{x,0,3}]&, 
    AppearanceRules -> <| "Title"->"linear function", "Description"-> "two numbers"|>]]

This gives as a result a website with

Graphics[ .... ]

but no plot.

Without FormFunction

CloudDeploy[Plot[Sin[1+2 x],{x,0,6}]]

works as expected.

POSTED BY: Holger Perlt
2 Replies
Posted 10 years ago

Hi Chad,

thanks - now it works.

POSTED BY: Holger Perlt

Set the ExportForm to something that the browser can display. The default is "WL" (wolfram language), which the browser cannot interpret. You can use an image format instead, like PNG, JPEG, etc. Below, I use "PNG"

CloudDeploy[FormFunction[{"first"->"Number","second"->"Number"}, Plot[1+3*x,{x,0,3}]&, "PNG",
    AppearanceRules -> <| "Title"->"linear function", "Description"-> "two numbers"|>]]
POSTED BY: Chad Knutson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract