Have to Setup Plotly in MatLab every time I run MatLab


I apologize in advance if this is a very simple question. I’ve tried looking through all of help forums and troubleshooting but I’m not skilled enough to fix my problem.

Basically everytime I run MatLab I have to go through the setup steps for Plotly.I follow all of the instructions except for the"saveplotlyconfig(‘your_base_domain’)" because I wasn’t sure what this meant. (I’m a new I apologize).

And when I do the setup I can create plotly graphs offline but not online.

When I try just using fig2plotly() I get this error:

Error using urlreadwrite (line 59)

Could not POST to URL.

Error in urlread (line 36)

[s,status] =


Error in makecall (line 27)

resp = urlread(url, ‘Post’,


Error in plotly (line 28)

response = makecall(args, origin,


Error in plotlyfig/plotly (line 432)

response =

plotly(obj.data, args);

Error in fig2plotly (line 49)


Any help would be really appreciated.

Hi there,
saveplotlyconfig() should automatically run at the setup step with the default value. We did have an issue previously where it was not run correctly.
If you upgrade your matlab api version you should be able to get everything set up just by running:

plotlysetup('YOUR_USERNAME', 'YOU_API_KEY')

If the problem persists perhaps there is an issue setting the default configuration. You can run the following line:
saveplotlyconfig('https://plot.ly', 'stream.plot.ly') to set the configuration to allow online plotting.

I am having the same error and none of chelsea’s suggestions helped resolve the issue. Any other ideas of what to try?

I am also having the same problem. Any ideas anyone?