File Exchange

image thumbnail

Plotly | Online MATLAB Graphing

version 1.6.0.0 (207 KB) by Chris
Publish your MATLAB figures to the web with one line of code.

27 Downloads

Updated 22 Sep 2017

GitHub view license on GitHub

Plotly (https://plot.ly/) is an online graphing platform that makes generating and sharing interactive, publication-quality figures easy.. This package converts your MATLAB figures into online Plotly graphs with a single line of code:
```
[X, Y, Z] = peaks;
contour(X,Y,Z,20)
fig2plotly()
```
This code generates this graph in your browser: https://plot.ly/~demos/1574
For more, see the official documentation at https://plot.ly/MATLAB.

Comments and Ratings (14)

Thank you

Thank you for this code but I am experiencing this error.

Error using urlreadwrite (line 58)
Could not POST to URL.

I created a plotly account (the free one) but do not know how to set up a browser. Any ideas?

Has anybody used plotly in MATLAB within two years? It seems to error with all new graphics objects which were introduced in 2014b. Errorbar, colorbar, legend(found a fix for this one)...

Matlab803

lambda=ones(1,2);tp0=ones(1,2);
tp1=ones(1,2);k=ones(1,2);gamma=ones(1,2);
% 1550nm,600线/mm,脉冲由100fs展宽为10ps
[lambda(1),tp0(1),tp1(1),k(1),gamma(1)]=deal(1550e-9,100e-15,10e-12,600e3,31);
% 1040nm,1740线/mm,脉冲由500fs展宽为10ps
[lambda(2),tp0(2),tp1(2),k(2),gamma(2)]=deal(1040e-9,500e-15,10e-12,1740e3,70);
gamma=gamma*pi/180;
c=3e8;
t0=tp0/1.665; %1/e宽度
t1=tp1/1.665;
GDD=-sqrt( t0.^2.*(t1.^2-t0.^2) ); %取负群延时色散
d=1./k;
omega=2*pi*c./lambda;
gammaLittrow=asin(lambda/2./d);
phiSpectral=-4*pi^2*c./(omega.^3.*d.^2).*(1-(2*pi*c./omega./d-sin(gamma)).^2).^(-1.5);
b=GDD/2./phiSpectral;
display(['1550nm littrow 角为',num2str(gammaLittrow(1)*180/pi),'°',])
display(['1550nm 光栅间垂直距离b=',num2str(b(1)),'m',])
display(['1040nm littrow 角为',num2str(gammaLittrow(2)*180/pi),'°',])
display(['1040nm 光栅间垂直距离b=',num2str(b(2)),'m',])

Rob Campbell

Yes, this is the fact that the FEX treats any change on Github as a new version. This doesn't make much sense, TBH.

arnold

I think it has to do with something new commited to github.

but yes, it IS annoying to see that here!

Budias Aao

Are you updating the image every day to make this submission always show up at top?

This is kind of spamming

Calum

Really good bit of code - works well and the web-rendering looks nice. Looking forward to the surf and mesh plots.

The MATLAB conversions literally let you add fig2plotly() to the end of your code and make a shareable, web-based MATLAB graphs. And it's interactive!

James

Chris

Really incredible. I convert all of my figures to online Plotly graphs now -- they're interactive and the PNG export is much higher quality.

Germán

Jan

For more than the half of the examples I get a running progress indicator only. Therefore I hesitate to use this for productive work.

Tom

Just a note- plot.ly/API doesn't work for me (page not found), but https://plot.ly/api does.

Updates

1.6.0.0

Update image

1.5.0.0

Link to the GitHub repo.

1.4.0.0

Fixed bug in API sign-up

1.2.0.0

Added contact info.

1.1.0.0

Updated docs

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor