Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML output points to a local copy of plotly.js #133

Closed
amellnik opened this issue Aug 7, 2017 · 2 comments
Closed

HTML output points to a local copy of plotly.js #133

amellnik opened this issue Aug 7, 2017 · 2 comments

Comments

@amellnik
Copy link

amellnik commented Aug 7, 2017

I just noticed that when I save plots to HTML files it references a local copy of plotly:

<html>
<head>
     <script src="C:\Users\amellnik\.julia\v0.6\PlotlyJS\deps\plotly-latest.min.js"></script>
</head>
...

Would it be acceptable to have this use the fastly CDN? We could also have it attempt to load the local version, and if it fails load the CDN copy (or the other way around). If so, let me know and I can submit a pull.

@sglyon
Copy link
Member

sglyon commented Aug 8, 2017

Hey @amellnik

This is actually already implemented. The js keyword argument accepts symbols :local, :embed, or :remote. :local is the default and is what you see, :embed just dumps all the js into the html file, and :remote uses the cdn.

You can see the option here in savefig, which just hands off to this show method

@sglyon sglyon closed this as completed Aug 8, 2017
@amellnik
Copy link
Author

amellnik commented Aug 8, 2017

Whoops -- I should have looked more closely -- thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants