Hi Sean,
Thanks for your answer. Actually I am doing on that way, so the argument is "PNG" Please see the whole code below.
myDist[Latitude_, Longitude_] :=
EstimatedDistribution[
WeatherData[{Latitude, Longitude},
"MaxWindSpeed", {{1990}, {2015}, "Year"}],
GumbelDistribution[\[Alpha], \[Beta]],
ParameterEstimator -> "MaximumLikelihood", WorkingPrecision -> 25]
CloudDeploy[
APIFunction[{"Latitude" -> "Integer", "Longitude" -> "Integer"},
Show[Histogram[
WeatherData[{#Latitude, #Longitude},
"MaxWindSpeed", {{1990}, {2015}, "Year"}], 6,
"ProbabilityDensity", ChartStyle -> "Aquamarine",
PlotRange -> All],
Plot[PDF[myDist[{#Latitude, #Longitude}],
Quantity[x, "Kilometers"/"Hours"]] // Evaluate, {x, 0, 200},
PlotRange -> {Automatic, All},
PlotStyle -> {Blend[{Blue, Black}], Thick}]] &, "PNG"],
Permissions -> "Public"]
However, it doesn't work properly. In some calls is ok but if I call again then the above result can be seen. Can be something with the function itself? What is also strange that in Mathematica notebook has similar output sometimes, after evaluate notebook.
I copy the link here below from the above code. I made it public, so you can test it yourself as well. (at the moment it works with integers)
https://www.wolframcloud.com/objects/5cc0a503-f381-4120-af24-89d4282989f9