Message Boards Message Boards

Put input values into a Cloud deployed API that creates a plot?

Posted 8 years ago

I have a problem here getting an array into my APIFunction after i deploy it in the cloud.

CloudDeploy[APIFunction[{"x"->"Array"},ListLinePlot[{#x}]&,"PNG"]]

i get this error when i try to add a value in the api

Failed to export to PNG for input:

$Failed[{}]

My array is

{{0,1},{1,.88},{5,0.814},{10, .796},{15,.783},{20,.766},{25,.739},{30,.711},{35,.681},{40,.65},{45,.617},{50,.58},{55,.543},{60,.478},{65,.41},{70,.328},{75,.233},{80,.14},{85,.062},{90,.02},{95,.003},{100,0}}

Is the type wrong ?

POSTED BY: cosmin sopca

"Array" is not an interpreter type. To see the full list of types, you can evaluate $InterpreterTypes.

Options that would work for your input include "List" and "Expression".

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